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

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

From: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 13 Jul 2015 08:03:02 +0200
Message-ID: <CADnb78hydE7FbD95UAo6TVjFymE1Toex-uTbD50fOLuHdoo+8Q@mail.gmail.com>
To: Elliott Sprehn <esprehn@chromium.org>
Cc: "olli@pettay.fi" <olli@pettay.fi>, Rick Byers <rbyers@chromium.org>, Tim Dresser <tdresser@chromium.org>, WHATWG <whatwg@whatwg.org>, Boris Zbarsky <bzbarsky@mit.edu>, Domenic Denicola <d@domenic.me>, Dave Tapuska <dtapuska@chromium.org>, Jonas Sicking <jonas@sicking.cc>
On Sun, Jul 12, 2015 at 11:52 PM, Elliott Sprehn <esprehn@chromium.org> wrote:
> This is what I had in mind as well. Also it occurs to me there's a missing
> primitive here for how the browser knows that all listeners have mayCancel:
> false so it can make this optimization. EventTarget needs some kind of
> method like:
>
> boolean hasOnlyPassiveEventListeners(DOMString type)
>
> so the scroll system can query if all listeners have mayCancel: false to
> make the optimization.

That would make event listeners observable.


-- 
https://annevankesteren.nl/
Received on Monday, 13 July 2015 06:03:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 July 2015 06:03:32 UTC