- From: François REMY <fremycompany_pub@yahoo.fr>
- Date: Wed, 8 Aug 2012 21:21:28 +0200
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: "CSS WG" <www-style@w3.org>
I'm obviously OK with this but I'm not a member of the group :-) However, I don't like the 'supports' name. if(CSS.supports("@keyframes")) { ... } seems legit but don't work. The function name doesn't express correctly what the function does. -----Message d'origine----- From: Tab Atkins Jr. Sent: Wednesday, August 08, 2012 6:40 PM To: Boris Zbarsky Cc: Glenn Adams ; www-style list Subject: 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.) ~TJ
Received on Wednesday, 8 August 2012 19:21:51 UTC