DOMString-like objects for the CSSOM

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