Re: [DOM] DOM4 draft : getAttributeNode() and getAttributeNodeNS() substitute ?

04.10.2012, 16:21, "Sylvain Spinelli" <sylvain.spinelli@free.fr>:
> Getting Attr object from an Element by its QName or localName + ns is
> really useful.
> Since Attr class no longer inherits from Node, "getAttributeNode" and
> "getAttributeNodeNS" names are misfit.
>
> Perhaps we could have 2 new methods :
> - Attr? getAttr(DOMString name);
> - Attr? getAttrNS(DOMString? namespace, DOMString localName);
>
> WDYT ?

Why someone at all could need to get an attribute as a node/object instead of a string (for the latter, `getAttribute()` works fine)?

`getAttributeNode()` should probably be just marked as obsolete.

Received on Thursday, 4 October 2012 16:37:27 UTC