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

Re: [DOM L3 Events] Mutation Events and Attr Nodes

From: Ojan Vafai <ojan@chromium.org>
Date: Fri, 30 Jul 2010 17:55:56 -0700
Message-ID: <AANLkTimPgiQRbF2o7X4AX9PMdt_sVeYCPdj45v32ZkDQ@mail.gmail.com>
To: Travis Leithead <travil@microsoft.com>
Cc: "www-dom@w3.org" <www-dom@w3.org>, Doug Schepers <schepers@w3.org>, "Olli@pettay.fi" <Olli@pettay.fi>
FWIW, I support this proposal.

On Thu, Jul 15, 2010 at 9:07 AM, Travis Leithead <travil@microsoft.com>wrote:

> 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 Saturday, 31 July 2010 00:56:47 GMT

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