Re: Better event listeners

On Tue, Feb 12, 2013 at 7:58 AM, Anne van Kesteren <annevk@annevk.nl> wrote:

> On Tue, Feb 12, 2013 at 12:31 AM, Glenn Maynard <glenn@zewt.org> wrote:
> > I think this proposal needs more consideration.  It's a simple,
> consistent
> > overload of an existing API, instead of a new API.  I've been told that
> it's
> > "confusing", but not how or why.  It seems simple and obvious to me, so I
> > don't know how to address this.  It seems much simpler than having two
> > distinct event listener APIs.  It doesn't give a nice two-letter function
> > name, but that's not a reason to have two APIs (at most it simply means
> > making an alias).
>
> Overloading an existing API to make it work completely different
> simply does not seem like a good strategy. We should just map it to
> the same underlying concepts.
>

It doesn't work completely differently.  It works exactly the same.
addEventListener("click", func, true) would be exactly equivalent to
addEventListener("click", func, {capture: true}).

-- 
Glenn Maynard

Received on Tuesday, 12 February 2013 14:24:23 UTC