-
Notifications
You must be signed in to change notification settings - Fork 97
Use EventTarget interface for events #18
Comments
It would be a LOT of work to convert everything over. I also kinda like the "on" and "once" terminology. |
ayo can support observables and Symbol.observable when those make Stage 3, right now it's all still stage 1 and they're figuring out the stuff themselves. |
for others who aren't aware of these things:
It doesn't sound like it would be a stretch to support EventTarget interface as well, but I haven't hacked on this codebase before. |
@omouse If you want to try and put a PR together for There’s also something in our CONTRIBUTING.md, where a lot obviously still refers to Node.js, but it should still be doable to work with it |
We talked a bit about this at the last TC39 meeting and the general consensus is that if you support EventTarget you should support the DOMExceptions it produces. Please try and conform to that if possible. You can read some of the discussion in the meeting notes. |
@addaleax the code would go into lib/events.js yah? thanks for the meeting notes @bmeck it looks like the relevant parts are:
and this:
also this:
seems like a lot of discussion on how abort/cancellation work, and some talk on the inheritance chain/prototype:
So I guess that's the big question and mirrors my question to @addaleax about where the api should be updated to support this interface. Should it be EventEmitter? Should it be a new prototype EventTarget that re-uses whatever we have in EventEmitter? |
|
@medikoo EventTarget as a separate prototype/class then? Sounds good to me. @caspervonb do you have a specific example or context that you'd like to use EventTarget in? |
No description provided.
The text was updated successfully, but these errors were encountered: