W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2010

[DOM L3 Events] Mutation Events and Attr Nodes

From: Travis Leithead <travil@microsoft.com>
Date: Thu, 15 Jul 2010 16:07:31 +0000
To: "www-dom@w3.org" <www-dom@w3.org>, Doug Schepers <schepers@w3.org>, "Olli@pettay.fi" <Olli@pettay.fi>
Message-ID: <9768D477C67135458BF978A45BCF9B38135893@TK5EX14MBXW603.wingroup.windeploy.ntdev.microsoft.com>
In IE9's implementation of DOMNodeRemoved/DOMNodeInserted, we are not implementing the capability described in the current editor's draft, which states that a conforming user-agent should fire these two events when Attr nodes are removed/added to an element [1] [2], also referenced in [3] [4]:

"A user agent must dispatch this event when a node has been added as a child of another node or, ---- in case of Attr nodes, has been added to an Element. ----"

I note that other user agents also do not implement this functionality for Attr nodes, despite having support for these events.

In addition, the DOMAttrModified event itself covers the notification of Attr additions and removals via it's "attrChange" property (ADDITION = 2, REMOVAL = 3).

Given the general lack of support from other user agents, and a plausible workaround using DOMAttrModified (for those user agents that support this event), I'd recommend that we allow a user agent that wants to implement the mutation events (despite their deprecation status), to avoid implementing the above functionality for Attr nodes.

I'd like to see some spec text that states something to the effect of: DOM L2 Events previously required DOMNodeRemoved/Inserted to fire when Attr nodes were added to an Element, however this requirement no longer applies in DOM L3 Events for user agents that implement these [DOMNodeRemoved/Inserted/etc.] mutation events.

-Travis

[1] http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-type-DOMNodeInserted 
[2] http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-type-DOMNodeRemoved 
[3] http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-type-DOMNodeRemovedFromDocument
[4] http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-type-DOMNodeInsertedIntoDocument
Received on Thursday, 15 July 2010 16:08:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:05 GMT