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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 13 Aug 2012 11:19:29 -0700
Message-ID: <CAAWBYDC_A-cKV5yq26f0_2rZ9iyFJsaPKP=v0WOF5OzPhMm_Uw@mail.gmail.com>
To: public-webapps <public-webapps@w3.org>
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.

(Right now, the only thing we want to add is a "supports()" function,
which is the API version of the upcoming @supports rule.  In the
future, we'd like to add things like the CSSOM Value API constructors
to it, so authors can do a simple "new CSS.px(5)" rather than "new
CSSPixelComponentValue(5)".)

Does anyone see any problems with this?  Do we think there's a
significant compat risk to claiming an all-caps "CSS" variable?

~TJ
Received on Monday, 13 August 2012 18:20:16 GMT

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