W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2012

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

From: Marat Tanalin | tanalin.com <mtanalin@yandex.ru>
Date: Thu, 04 Oct 2012 20:36:44 +0400
To: Sylvain Spinelli <sylvain.spinelli@free.fr>,"www-dom@w3.org" <www-dom@w3.org>
Message-Id: <132491349368604@web30e.yandex.ru>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 4 October 2012 16:37:30 GMT