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

Re: DOM Level 3 Events

From: Emanuele D'Arrigo <manu3d@gmail.com>
Date: Mon, 18 May 2009 22:49:13 +0100
Message-ID: <915dc91d0905181449m74e88cf7q901dc45c2ea4881d@mail.gmail.com>
To: "www-dom@w3.org" <www-dom@w3.org>
2009/5/18 Travis Leithead <Travis.Leithead@microsoft.com>

> My understanding is that the “document does it all”. In this manner,
> recursive or re-entrant event handlers that modify the tree do not have an
> effect on the original computed path. In other words, if an event handler is
> triggered which removes the target node from the document before the capture
> phase completes, that target node will still receive the event despite the
> fact that it’s no longer in the tree (because the document is managing
> it).
>
I agree with you that's the path I've eventually decided to follow. It
should be said however that from an implementation point of view the second
method is not entirely infeasible and therein lies the minor ambiguity.
I.e., if the event is initialized with, among other things, a nodelist
detailing its propagation path, each event target along the way can be
responsible for pushing (or not) the event to the next target node, no
matter if the node is or is no longer in the tree. I think.

But I think the first method is just cleaner and simpler, I do not see
advantages with the idea of event targets passing each other the event.

Thank you!

Manu
Received on Monday, 18 May 2009 21:50:08 GMT

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