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

RE: Node::normalize behaviour

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Mon, 5 Nov 2001 09:38:43 -0500
To: www-dom@w3.org
Message-ID: <OFD6DE45E5.D4CA681E-ON85256AFB.004FC24D@pok.ibm.com>

> By the way, what should happen with registered event listeners

I believe event listeners should see mutation events reporting nodes
removed, modified, and/or added, just as if the equivalent of the normalize
() had been performed manually via individual DOM calls. If you want to
keep the listeners associated with the text, it's your responsibility to
use these events to move the listeners to the one resulting text node. Note
that there's no promise about exactly which sequence of operations is
performed, so there's no guarantee about what mutation events will be

(The DOM really can't move the listeners for you, because it doesn't know
whether that's really what you want to do or not or what non-DOM
information associated with your listeners might need to be updated.)

Note that one way to dodge this issue, in some cases, may be to register
your listeners on the element instead.

>or DOM level 3 user data on the original individual text nodes?

Last time I looked, a similar answer applied.

Joe Kesselman  / IBM Research
Received on Monday, 5 November 2001 09:39:22 UTC

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