W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2012

Re: Acceptable for CSS to add a "window.CSS" global?

From: Odin Hørthe Omdal <odinho@opera.com>
Date: Tue, 14 Aug 2012 11:20:24 +0200
To: public-webapps@w3.org
Message-ID: <op.wi0xkaz949xobu@odinho-fido.oslo.osa>
On Mon, 13 Aug 2012 20:19:29 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

> The CSSWG would like to add a new top-level object called "CSS" that
> we can hang several functions and constructors off of, so that we can
> avoid the excessive verbosity that's probably required if we just put
> everything on window

Cool! While reviewing some @supports tests just a few weeks ago I in fact  
wondered about the same thing. We tend to have long names and they're not  
always that easy to remember or use. And @supports corresponds to  
CSS.supports() sure sounds much nicer than supportsCSS(). And it's not  
like we have too few functions hanging directly off window.

Another benefit is that with a CSS top-level object, you can expand that  
in your debugger and hopefully get some relevant "documentation" right  
there, instead of looking for functions with "CSS" in them on window.

FWIW I really like it.

-- 
Odin Hørthe Omdal (Velmont/odinho) · Core, Opera Software, http://opera.com
Received on Tuesday, 14 August 2012 09:20:57 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:54 GMT