- From: Isiah Meadows <notifications@github.com>
- Date: Sat, 18 Mar 2017 23:56:28 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Sunday, 19 March 2017 06:57:00 UTC
I mean, effectively this: ```js var old = EventTarget.prototype.addEventListener EventTarget.prototype.addEventListener = function (listener, opts) { if (opts == null || !opts.passive || !opts.stopPropagation && !opts.preventDefault) { old.call(this, listener, opts) } else { const {stopPropagation, preventDefault} = opts old.call(this, ev => { if (stopPropagation) ev.stopPropagation() if (preventDefault) ev.preventDefault() return listener(ev) }, opts) } } ``` Although, now that I think about it, the things affecting rendering performance (like scrolling) already have other ways of disabling them (like via CSS), so this would literally provide no benefit. -- 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/425#issuecomment-287598648
Received on Sunday, 19 March 2017 06:57:00 UTC