- From: Antoine Quint <ml@graougraou.com>
- Date: Tue, 3 Jan 2006 20:45:23 +0100
- To: www-svg@w3.org
- Message-Id: <B55EF9EA-9628-4C45-AFDF-28FC71022003@graougraou.com>
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
Attachments
- application/pkcs7-signature attachment: smime.p7s
Received on Tuesday, 3 January 2006 19:45:47 UTC