- From: Andrea Giammarchi <notifications@github.com>
- Date: Tue, 27 Aug 2024 03:02:18 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 27 August 2024 10:02:22 UTC
FYI I've proposed to expose `event.waitUntil` when a listener is asynchronous as there's previous work on that within a Service Worker `fetch` listener ... and that didn't go well. [As possible workaround](https://github.com/WebReflection/coincident/blob/ee25e58e449170729e767d8cfef11dbf073632cd/src/window/events.js), we ended up polluting the `addEventListener` to make it possible to prevent the default (or stop propagation) wen a listener comes from a worker. Basically if the options contains an `invoke` field which is a `stopPropagation` or `preventDefault` string, or an array with one or more methods to invoke, when the event triggers these methods are invoked. This works well **only** if you know AOT you want to prevent that default or stop that (immediate) propagation. It cannot possibly work in any other scenario and it can't work conditionally neither (but that's an implementation detail/limitation). -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/1308#issuecomment-2312092066 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/1308/2312092066@github.com>
Received on Tuesday, 27 August 2024 10:02:22 UTC