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

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 UTC