W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2011

[DOMCore] Is Element.attributes live or static?

From: David Flanagan <dflanagan@mozilla.com>
Date: Sun, 19 Jun 2011 22:26:03 -0700
Message-ID: <4DFED9EB.4080103@mozilla.com>
To: www-dom@w3.org
With all the changes that DOM Core makes to the attributes attribute 
(moving it from Node to Element, changing it from NamedNodeMap to 
Attr[], and making Attrs not nodes) it is no longer clear whether it is 
supposed to be a live representation of an elements' attributes.

5.6 only says this: "The |attributes| attribute must return a read only 
array <http://dev.w3.org/2006/webapi/WebIDL/#dfn-read-only-array> of the 
context object 
associated |Attr 
<http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#attr>| objects. "

6 says " Unless otherwise stated, a collection 
must be live 
but it also defines a collection as "A collection is an object that 
represents a lists of DOM nodes.", and then goes on to document NodeList 
and HTMLCollection, so it seems clear that this section does not apply 
to an Attr[].

I assume that web compatibility requires attributes to be live.  But I 
think that DOM Core needs to state this explicitly.

Received on Monday, 20 June 2011 05:26:32 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:17 UTC