W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2013

Re: Better event listeners

From: Glenn Maynard <glenn@zewt.org>
Date: Sat, 5 Jan 2013 18:59:42 -0600
Message-ID: <CABirCh8F-7MOsRhzC04JAu72MXEtmO6_3-00wAK5bhsdxQynJQ@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-dom@w3.org
On Sat, Jan 5, 2013 at 6:42 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> You'll have to use a union with switching on the passed-in type in the
> prose (because people made the boolean optional, and dictionaries are
> always optional, so using overloads here would make 2-argument calls
> ambiguous).
>

You could make the boolean non-optional to get the same effect, since the
dictionary overload's defaults should be identical to addEventListener(e,
h, false).

-- 
Glenn Maynard
Received on Sunday, 6 January 2013 01:00:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 January 2013 01:00:14 GMT