[SVGMobile12] SVGT12-307: setAttributeNS() raising exceptions on newly-created elements

Section 5.1.2 The 'svg' element says:

# This attribute is read-only and cannot be modified via the uDOM
# api. Attempt to set the 'version' attribute with the setAttributeNS
# must result in an NO_MODIFICATION_ALLOWED_ERR being raised.

Please edit the spec so that it can't be misinterpreted to read that
the setAttributeNS() method in DOM 3 Core should also raise that
exception in the given case.

This is needed because a literal interpretation would make the
following script raise an exception in a UA that implements DOM 3
Core, which would be a problem for any dynamic content creation:

   <script>
     var svg = document.createElementNS(svgNS, 'svg');
     svg.setAttributeNS(null, 'version', '1.2');
   </script>

This would also be incompatible with earlier versions of SVG.

This same problem is also present for the "baseProfile" attribute.

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 8 December 2005 22:16:43 UTC