ISSUE-2160 (BadThrowHref): Throwing INVALID_ACCESS_ERR when setting <use xlink:href=""> [Last Call: SVG 1.2 Tiny ]

ISSUE-2160 (BadThrowHref): Throwing INVALID_ACCESS_ERR when setting <use xlink:href=""> [Last Call: SVG 1.2 Tiny ]

http://www.w3.org/Graphics/SVG/WG/track/issues/2160

Raised by: Cameron McCormack
On product: Last Call: SVG 1.2 Tiny 

http://lists.w3.org/Archives/Public/public-svg-wg/2008OctDec/0235.html

The spec currently says, in the description of when setTraitNS() throws
an INVALID_ACCESS_ERR DOMException:

  Raised if the input value is an invalid value for the given trait or
  null is specified.  This exception is also thrown when the 'use'
  element is hooked into the document tree and the the value of
  'xlink:href' is set invalid.
   — http://dev.w3.org/SVG/profiles/1.2T/publish/svgudom.html#svg__TraitAccess_setTraitNS

In the “note about invalid/unsupported trait values” section, it says
that INVALID_ACCESS_ERR is thrown whenever an unsupported value is set
for the trait.  It doesn’t mention anything about whether the element is
in the document tree or not, however.

Given that the sentence mentioning @xlink:href on <use> describes a
subset of the situations when the exception would be thrown anyway, due
to the other section, I think it should be removed, as it could mislead
people into thinking that the exception is not thrown if the element is
not in the tree.

Received on Friday, 24 October 2008 07:51:51 UTC