W3C home > Mailing lists > Public > public-svg-wg@w3.org > July to September 2009

SVG DOM objects reflecting non-existent attributes

From: Cameron McCormack <cam@mcc.id.au>
Date: Sun, 27 Sep 2009 23:15:37 -0700
To: public-svg-wg@w3.org
Message-ID: <20090928061536.GB25086@wok.mcc.id.au>
Hi all.

We added this text from an erratum:

  When an object is accessed via the SVG DOM that hasn’t been specified
  in the document, e.g. if rectElement.x.baseVal is accessed and the ‘x’
  attribute was not provided, a corresponding SVG DOM object is created
  and initialized with a value that is equivalent to the value used in
  rendering when the attribute was not provided. The returned object
  does not affect rendering until it is modified for the first time.
  After the first modification the object becomes live, meaning that any
  modifications made to the corresponding attribute are immediately
  reflected in the object.

with some additional notes about appropriate values for some trickier
cases.  The notes don’t sound particularly comprehensive though.  This
makes me worry about testing this.  I think we should list all non-
straightforward cases and require particular values.

Also, we should state what happens to the value in the SVG DOM object if
the corresponding attribute is removed from the element.  Does it revert
to its static (until the attribute is set again) equivalent value?

Thanks,

Cameron

-- 
Cameron McCormack ≝ http://mcc.id.au/
Received on Monday, 28 September 2009 06:16:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 28 September 2009 06:16:24 GMT