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

It doesn’t have to be on every instance, it could be on the CSSStyleDeclaration object itself (i.e. similar to a static method in traditional OO languages), the same way e.g. Array.isArray() is attached on the Array object itself and not on every instance. I believe that’s what François was suggesting.

Lea Verou
W3C developer relations
http://lea.verou.me ☻ @leaverou



On Aug 4, 2012, at 02:15, Florian Rivoal wrote:

> On Fri, 03 Aug 2012 16:03:19 +0200, Daniel Glazman <daniel.glazman@disruptive-innovations.com> wrote:
> 
>> Le 03/08/12 14:44, François REMY a écrit :
>>> I remember I once proposed to use CSSDeclaration instead of the global
>>> object.
>>> 
>>> if(CSSDeclaration.isValid("color","red")) {
>>> ...
>>> }
>>> 
>>> or
>>> 
>>> if(CSSDeclaration.isValid("color: red")) {
>>> ...
>>> }
>> 
>> That does make a lot of sense, indeed!
> 
> I assume you mean CSSStyleDeclaration rather than CSSDeclaration.
> 
> This makes some sense, but I am only moderately comfortable having it attached to every instance of a CSSStyleDeclaration
> in the document, despite the fact that the result does not depend on which one you call it on.
> 
> - Florian
> 

Received on Friday, 3 August 2012 15:31:15 UTC