W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2010

DOMString-like objects for the CSSOM

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 19 Feb 2010 15:57:47 +0100
To: "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <op.u8dqilqq64w2qv@annevk-t60>
For the CSSOM the CSS WG has an idea on how we can extend the current  
string-based interface to CSS property values to become an object-based  
interface in a mostly backwards compatible way.

The way this would work is that the attributes on the CSSStyleDeclaration  
interface (you can get access to an object implementing that interface  
through e.g. document.body.style) no longer return a DOMString but a  
DOMString-like object. This DOMString-like object has all the  
functionality of DOMString but also supports additional features. E.g. in  
the case of a CSS color property it would have red/green/blue/alpha  
members that allow reading and direct manipulation of various aspects of  
the color value.

I wondering whether there was some shorthand that we could introduce in  
Web IDL for this. E.g. allow an interface to inherit from DOMString.  
Thoughts?


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Friday, 19 February 2010 14:58:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:02 UTC