W3C home > Mailing lists > Public > www-svg@w3.org > January 2006

Re: [SVGMobile12] SVGT12-207: Conformance to uDOM

From: Antoine Quint <ml@graougraou.com>
Date: Tue, 3 Jan 2006 20:45:23 +0100
Message-Id: <B55EF9EA-9628-4C45-AFDF-28FC71022003@graougraou.com>
To: www-svg@w3.org
On 3 janv. 2006, at 19:37, Ian Hickson wrote:

>> With existing DOM:
>
>    function highlightButton(bHighlight) {
>      var nHighlight = (bHighlight ? : 20 : -20);
>      var ele = document.getElementById("buttonSurface");
>      var color = getComputedStyle(ele, '').getPropertyCSSValue 
> ('fill').getRGBColorValue();
>      document.getOverrideStyle(ele, '').setProperty('fill', 'rgb(' +
>        (color.red + nHighlight) + ', ' +
>        (color.green + nHighlight) + ', ' +
>        (color.blue + nHighlight) + ')');
>    }

This requires a fair ammount of string manipulations, exactly the  
kind of things that the SVG WG was trying to avoid spec'ing out  
mobile-friendly APIs.

> (There are plans for making big improvements to the CSSOM which would
> reduce this to:
>
>    function highlightButton(bHighlight) {
>      var nHighlight = (bHighlight ? : 20 : -20);
>      var ele = document.getElementById("buttonSurface");
>      var color = ele.runtimeStyle.color;
>      color.red += nHighlight;
>      color.green += nHighlight;
>      color.blue += nHighlight;
>    }
>
> ...but they have not been specced out yet.)

So they're out of scope for this debate since they're not "existing  
DOM technology".

Antoine
-- 
Antoine Quint  Fuchsia Design
SVG & Client-side XML Consulting
W3C SVG WG Invited Expert
http://fuchsia-design.com




Received on Tuesday, 3 January 2006 19:45:47 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:33 GMT