Re: [whatwg/dom] Allow an EventTarget to provide the default value of the AddEventListenerOptions (#365)

Given the goal of making some `addEventListener('touchfoo', callback)` calls result in passive behavior without code changes, I don't see any way other than treating a missing `passive` member as a third state that resolves to either true or false. So I have no suggested changes for the behavior itself.

Making EventTarget the extension point works for me, but I can see two other ways that'd be indistinguishable but result in different layering:
* Instead of making the event target the extension point and passing the event type, make the event type the extension point and pass the event target.
* Resolve undefined to true or false later when determining which elements have event handlers that can `preventDefault()` and block scrolling.

In both cases Touch Events would use the extension point. If either of those or another mechanism seems preferable to anyone they ought to work, but implementation-wise I think there's little reason to layer things like that.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/365#issuecomment-258954210

Received on Monday, 7 November 2016 20:34:58 UTC