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

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

From: Allen, Michael B (RSCH) <Michael_B_Allen@ml.com>
Date: Mon, 20 Aug 2001 18:54:08 -0400
Message-ID: <B27EB33BAB29D2119ABF0001FA7EF289053BF163@ewfd04.exchange.ml.com>
To: "'David Brownell'" <david-b@pacbell.net>, "Philippe Le Hegaret" <plh@w3.org>, "Curt Arnold" <carnold@houston.rr.com>
cc: www-dom@w3.org

> -----Original Message-----
> From:	David Brownell [SMTP:david-b@pacbell.net]
> 
> > We changed the specification following a comment from
> > Ralph Levien during the CR phase:
> > http://lists.w3.org/Archives/Public/www-dom/2000JanMar/0289.html
> 
> 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.

	Mike
Received on Monday, 20 August 2001 18:54:19 GMT

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