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

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

From: Philip Jägenstedt <philipj@opera.com>
Date: Thu, 9 Jul 2015 18:43:28 +0200
Message-ID: <CAMQvoCku9SV3nWzwEgOX2AVMxtvWd9ABT0=9axDes_crn-edag@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: WHATWG <whatwg@lists.whatwg.org>
On Thu, Jul 9, 2015 at 6:40 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> 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.

Ah, that's cool :)

Philip
Received on Thursday, 9 July 2015 16:43:56 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 9 July 2015 16:43:56 UTC