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

Re: Better event listeners

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sat, 05 Jan 2013 19:42:50 -0500
Message-ID: <50E8C88A.5030302@mit.edu>
To: www-dom@w3.org
On 1/5/13 2:30 PM, Glenn Maynard wrote:
> we can override addEventListener straightforwardly, when the
> third parameter is a dictionary instead of a boolean

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).

But I think the union _might_ work.  I haven't checked carefully.

-Boris
Received on Sunday, 6 January 2013 00:43:19 GMT

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