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: Sat, 11 Jul 2015 19:48:11 +0200
Message-ID: <CADnb78i8HynywAN9ySmXwryHRpW3SGc_vDwQ3JmOyoBGjBMHtA@mail.gmail.com>
To: Rick Byers <rbyers@chromium.org>
Cc: "olli@pettay.fi" <olli@pettay.fi>, 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 Fri, Jul 10, 2015 at 9:12 PM, Rick Byers <rbyers@chromium.org> wrote:
> 1) Should we extend the existing addEventListener API or change the API
> names (and perhaps other things) completely.
> https://github.com/RByers/EventListenerOptions/issues/18

It seems most other "DOM peers" are okay with overloading the third
argument. I can settle on that if that moves things along faster.


> 2) Should mayCancel=false listeners always get an Event with
> cancelable=false, or is this "just a hint" such that all listeners still get
> the same event with the same properties.
> https://github.com/RByers/EventListenerOptions/issues/2

I was thinking that this basically sets a flag used during the
invocation of the listener that makes preventDefault() a no-op (or
throw?) for that listener. But it would not affect other listeners or
the Event object. The user agent could then make an optimization if no
"traditional" listener was added.


-- 
https://annevankesteren.nl/
Received on Saturday, 11 July 2015 17:48:41 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 11 July 2015 17:48:42 UTC