Re: [whatwg/dom] once() and on() async utilities for EventTarget (Issue #1038)

Related: [proposal to add Observables and make EventTarget observable](https://github.com/domfarolino/observable).

The `once` case would be `await target.on('event').first()`. The iterator case would require [a new helper](https://github.com/domfarolino/observable/issues/33), and a choice of queuing strategy, but you can imagine something like `for await (item of target.on('event').iterate('unbuffered')) ...`.

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

Message ID: <whatwg/dom/issues/1038/1700292085@github.com>

Received on Thursday, 31 August 2023 02:46:31 UTC