Re: Add extra argument to addEventListener with the context

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 UTC