- From: Darien Maillet Valentine <notifications@github.com>
- Date: Wed, 01 Dec 2021 19:24:22 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 2 December 2021 03:24:34 UTC
If API additions along these lines become a thing, I hope its API can be devised in a way that accounts for race/all patterns. I've used homegrown promise/async-iterable DOM event utils along these lines for a while and the most interesting thing I've learned from it has been that "race patterns" are pretty common with DOM events. These are essentially "_any_ of these events once." _Usually_ they're events dispatched by a single target, but and opts.once is unhelpful for them: if anything, it makes it harder to spot the bug if you've failed to wire things up to cause removal of the other listeners when the first event is dispatched. -- 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/1038#issuecomment-984258199
Received on Thursday, 2 December 2021 03:24:34 UTC