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

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

From: Elliott Sprehn <esprehn@gmail.com>
Date: Fri, 17 Aug 2012 12:33:38 -0700
Message-ID: <CAPJYB1g1Dtg6qpm-=uSakZ09x+GAWE+5xidu163_cObEDw1u3g@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Sylvain Galineau <sylvaing@microsoft.com>, Boris Zbarsky <bzbarsky@mit.edu>, Glenn Adams <glenn@skynav.com>, www-style list <www-style@w3.org>
On Fri, Aug 17, 2012 at 10:27 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>...
> However, I'm not sure what the problem is in the first place.  Nested
> document have their own "window" object, so they'll have their own
> "CSS" object as well.  It can return whatever answer is appropriate
> for that document's mode.
>

This still feels wrong from a software design perspective. I'm not
asking if CSS supports this feature, I'm asking if /this document/
supports this CSS feature.

You also create a cyclical relationship between the CSS object and
document. CSS needs to account for the document state to say what is
supported, and document needs to consult the CSS object to decide
what's allowed while parsing. (Not really, but conceptually this is
what's happening).

This is like adding Events.addDocumentListener instead of
document.addEventListener.

- E
Received on Friday, 17 August 2012 19:34:27 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:58 GMT