Re: Better event listeners

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 UTC