- From: Claudia Meadows <notifications@github.com>
- Date: Tue, 09 Mar 2021 00:45:54 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 9 March 2021 08:46:08 UTC
I could, but it's a little awkward, especially when implementations already necessarily need the data and could expose it in approximately the same number of lines of code: ```js // Here's a polyfill for that above `e.immediatePropagationStopped` ;(function() { const _immediatePropagationStopped = new WeakSet() const stopImmediatePropagation = Event.prototype.stopImmediatePropagation Event.prototype.stopImmediatePropagation = function () { const result = stopImmediatePropagation.apply(this, arguments) _immediatePropagationStopped.add(this) return result } Object.defineProperty(Event.prototype, "immediatePropagationStopped", { configurable: true, enumerable: true, get: function immediatePropagationStopped() { return _immediatePropagationStopped.has(this) } }) })(); ``` -- 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/958#issuecomment-793562155
Received on Tuesday, 9 March 2021 08:46:08 UTC