Re: SVG12: trait access on illegal names

Dearest Björn,

Bjoern Hoehrmann wrote:
>   From it
> seems the draft is unclear how the various trait access operations will
> behave when syntactically invalid parameters are passed, e.g.
>   getTrait("+")
> does not appear to raise an exception. Please change the draft such that
> such illegal parameters raise an exception, e.g. a INVALID_CHARACTER_ERR
> DOMException.

For any unknown trait name, the implementation will throw a DOMException 
with code NOT_SUPPORTED_ERR. Since there is no "+" trait, an exception 
will be thrown for your case. Differentiating between various types of 
non-existent traits incurs higher cost for implementations with no 
obvious gain.

Robin Berjon
   Research Scientist

Received on Thursday, 19 May 2005 05:44:36 UTC