SVG DOM objects reflecting non-existent attributes

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 UTC