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

Re: adoptNode description

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Fri, 3 Aug 2001 19:11:42 -0400
To: "'www-dom@w3.org'" <www-dom@w3.org>
Message-ID: <OFCA43316A.09E8D003-ON85256A9D.007F0B39@pok.ibm.com>

>What happens with EventListener's that are registered on adopted Node's?

We should probably make that explicit, but the intent is that if adoptNode
work at all, it really does give you "the same node" with all associated
data. So yes, registered Event Listeners remain registered.

>Typically, these are not stored with the Node, but are stored in a Map
>in the Document.

Implementation detail. Architecturally, they're registered on the
EventTarget -- which is the node. Yes, if you've stored them separately you
have to deal with transferring that information to the new document at the
same time that you transfer the node.

Or, if that's impractical, adoptNode() can fail. It's a bit odd in being a
"best-effort" function; it works when and where it happens to work...

Joe Kesselman  / IBM Research
Received on Friday, 3 August 2001 19:12:21 UTC

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