W3C home > Mailing lists > Public > www-svg@w3.org > November 2002

Read-only attributes

From: Niklas Gustavsson <niklas@protocol7.com>
Date: Tue, 19 Nov 2002 17:52:13 +0100
To: www-svg@w3.org
Message-ID: <ardq4a$l71$1@main.gmane.org>

Hi there

Sorry for all my questions today but I'm trying to get all of this out of my
mind for now :-)

Some time ago we had this discussion on svg-developers (see for example
http://groups.yahoo.com/group/svg-developers/message/22744) and we really
never settled on a correct answer.

The question was basically: when a property is read-only, for example
SVGLineElement.x1, is it allowed to do:
myLine.x1.baseVal.value = 10
or does the read-only "inherit" all the way down?

x1 is read-only, baseVal is read-only but value on a SVGLength is read/write
but with this addition:
Exceptions on setting
DOMException NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the
value of a readonly attribute.

So, should the statement above result in the line moving or an exception?

Sorry if this was answered before and I missed it.
Received on Tuesday, 19 November 2002 11:53:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:54 UTC