W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2015

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Thu, 09 Jul 2015 12:40:12 -0400
Message-ID: <559EA3EC.70106@mit.edu>
To: whatwg@lists.whatwg.org
On 7/9/15 8:42 AM, Philip J├Ągenstedt wrote:
> Would there be any way to feature detect support for EventListenerOptions as the third
> argument?

Yes.  You call addEventListener and pass an object that has getters for 
the properties you care about detecting.  If those getters get invoked, 
the browser knows about those dictionary properties.

> Also, I think that this would make good sense as part of DOM itself,

This spec requires changes to DOM anyway, because the spec as written is 
not valid IDL: It's creating two overloads that can both be called with 
two arguments.  So we'll need to remove the "optional" annotation from 
the boolean arg that's already in DOM when we add this new overload. 
That doesn't seem like a problem.

-Boris
Received on Thursday, 9 July 2015 16:40:40 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 9 July 2015 16:40:41 UTC