This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24388 - Expose CSS-support API to Web Workers
Summary: Expose CSS-support API to Web Workers
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: Conditional Rules (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: L. David Baron (Mozilla)
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-24 23:25 UTC by Jonas Sicking (Not reading bugmail)
Modified: 2014-10-02 17:52 UTC (History)
2 users (show)

See Also:


Attachments

Description Jonas Sicking (Not reading bugmail) 2014-01-24 23:25:06 UTC
We should expose the CSS-support API to Web Workers.

This is going to be especially important for ServiceWorkers who will want to decide which resources to download based on capabilities of the UA.

So for example if a UA doesn't support some flexbox, the website might want to cache an additional JS library which provides a fallback.

Does CSS-support enable detecting things like support for different font formats and image formats? That's also needed for service workers, but might be a separate API?
Comment 1 Simon Pieters 2014-01-25 20:37:14 UTC
You mean CSS.supports(), right?

(In reply to Jonas Sicking from comment #0)
> Does CSS-support enable detecting things like support for different font
> formats and image formats?

No. It just checks if it parses successfully. See http://www.w3.org/TR/css3-conditional/#the-css-interface

> That's also needed for service workers, but might
> be a separate API?

Could you file a new bug for that, please?
Comment 2 Jonas Sicking (Not reading bugmail) 2014-01-27 18:57:01 UTC
Yes, I mean CSS.supports().

A more detailed description of the use-case is available in bug 24387 comment 2. That bug tries to cover querying for hardware metrics. However the use case mentioned there could also require asking about software capabilities like CSS support from the worker.

In particular, being able to pre-cache JS-libraries which provide fallback to missing CSS support would be useful.