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

[SVGMobile12] A.7.5 SVGRGBColor attributes should not be readonly

From: Jeff Schiller <codedread@gmail.com>
Date: Tue, 3 Jan 2006 13:22:24 -0600
Message-ID: <da131fde0601031122y52c641b3yea4a4bf1922e3bde@mail.gmail.com>
To: derhoermi@gmx.net, www-svg@w3.org

The SVGRGBColor attributes red, green and blue are specified as
readonly.  Yet the getRGBColorTrait() in Section A.7.12 clearly states
that the return value is a "a copy of the trait value".  Thus,
developers should be able to freely modify these values as they can
for SVGRect, etc to ease the code and optimize performance (doesn't
require creation of multiple SVGRGBColor objects):

var color = ele.getRGBColorTrait("fill");
color.red += 20;
color.green = 0;
ele.setRGBColorTrait("fill", color);

instead of:

var color = ele.getRGBColorTrait("fill");
document.documentElement.createSVGRGBColor(color.red + 20, 0,

Please remove the "readonly" specifier from the red, green and blue
attributes of the SVGRGBColor interface.

Jeff Schiller
Received on Tuesday, 3 January 2006 19:22:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:06 UTC