RE: [Events] removeEventListener on EventListeners currently bein g processed

> -----Original Message-----
> From:	David Brownell []
> > We changed the specification following a comment from
> > Ralph Levien during the CR phase:
> >
> That shows that several folk raised the issue of  that
> change introducing an asymmetry with respect to
> addEventListener(), which should have been dealt
> with at the same time.
> I think the corresponding change on the addEventListener
> side is a guarantee that a listener added to the current
> node _will_ be invoked as appropriate. 
	So , you mean that adding an event listener to a list currently being processed
	should be invoked? If so, I don't see why this is "appropriate". This is not about
	symmetry, it's about potentially provoking code that may not longer be valid
	due to dangling pointers, inconsistent state, etc. I think when an event is
	dispatched, it should try to appear as an atomic operation, meaning a copy of
	the listener list is used. This was probably the reasoning behind the original
	proposal. But it was not suitable in practice for removing listeners because
	data and state associated with the listener may no longer be valid.


Received on Monday, 20 August 2001 18:54:19 UTC