Re: [css3-conditional] navigator.supportsCSS rather than window.supportsCSS

So, based on the discussions on this thread, what does the group feel
about defining a new global named "CSS", which we use to hang new
css-related things off of that may not be worth polluting the global
object with (or that would require a cumbersome name if they were put
on the global).

In this case, the function would just be called "supports()", hung off
of CSS.  This is a single character longer than "supportsCSS()", which
is currently the shortest clear name we've come up with (and thus very
attractive to me).

The main benefit of starting this now is that we'll have the precedent
already established in the future, so that we can, for example, hang
all the new CSS value constructors off of it (I'd much rather type
"new CSS.px()" than "new CSSPixelComponentValue(5)".  (Officially, the
interface will still hang off of the global object with the dumb long
name, but there would be an additional function that acts as a
constructor hung off of the CSS object.  However, heycam is amenable
to amending WebIDL to actually allow nested interfaces so we don't
have this cruft, if we decide that would be a good idea.)


Received on Wednesday, 8 August 2012 16:40:54 UTC