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

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

From: Lea Verou <lea@w3.org>
Date: Sat, 4 Aug 2012 02:37:11 +1200
Cc: www-style@w3.org
Message-Id: <56275530-5380-41E3-85B3-00E0903AD097@w3.org>
To: Florian Rivoal <florianr@opera.com>
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 GMT

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