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

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