W3C home > Mailing lists > Public > www-style@w3.org > August 2012

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 8 Aug 2012 09:40:07 -0700
Message-ID: <CAAWBYDAozSowGUp5zts6ii9yAfqAZaPLJVdGxMpZHj0q93md=w@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Glenn Adams <glenn@skynav.com>, www-style list <www-style@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:20 UTC