W3C home > Mailing lists > Public > www-svg@w3.org > December 2005

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

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 8 Dec 2005 22:16:27 +0000 (UTC)
To: www-svg@w3.org
Message-ID: <Pine.LNX.4.62.0512082204520.7669@dhalsim.dreamhost.com>

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:

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

This would also be incompatible with earlier versions of SVG.

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

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

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:05 UTC