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

Re: Add extra argument to addEventListener with the context

From: Elliott Sprehn <esprehn@gmail.com>
Date: Mon, 18 Jun 2012 11:15:10 -0700
Message-ID: <CAPJYB1j8By7Y-Td0QZYSx722DNEhK6xYFzfubpcnswEMw=Aj9g@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-dom@w3.org
On Fri, Jun 15, 2012 at 4:03 PM, Glenn Maynard <glenn@zewt.org> wrote:

> ...
> It wouldn't make sense to add this to addEventListener without adding it
> to setTimeout, setInterval, Canvas.toBlob, and so on.
>

Sure it would. toBlob has no concept of canceling, and setInterval and
setTimeout both have canceling systems that require passing a numeric
identity instead of the original arguments.

The EventTarget system is special because to cancel you must pass the exact
same arguments to removeEventListener. By adding this extra argument you
make that easier.
Received on Monday, 18 June 2012 18:15:59 GMT

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