-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed as not planned
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Description
What is the problem this feature will solve?
This sounds like a simple feature request. We already got EventTarget
and Event
. So my feature request is to have a globalThis.addEventListener
. (along with remove & dispatch) added to the global scope (by extending EventTarget)
What is the feature you are proposing to solve the problem?
Deno, browser and web workers and even cloudflare workers already has a global event listener that can be used to listen to a variety of things.
It can be used for listening to eg PostMessage, network offline/online, background fetch, any kind of errors etc.
This is partly related to #43583
Having different code paths to solve the same things gets troublesome.
What alternatives have you considered?
No response
JulianCataldo, jcbhmr and jimmywarting
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.