-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Closed
Labels
eventsIssues and PRs related to the events subsystem / EventEmitter.Issues and PRs related to the events subsystem / EventEmitter.web-standardsIssues and PRs related to Web APIsIssues and PRs related to Web APIs
Description
While Node.js's node:events
module provides similar functionality to chromium, it does not comply with the DOM spec.
Consider the following code snippet:
const target = new EventTarget();
const event = new Event('foo');
target.dispatchEvent(event);
console.log(event.currentTarget);
In Node.js (and Chromium), this code will log EventTarget {}
. However, in other engines and browsers, it will log null
. As a result, Node.js may not be fully compliant with EventTarget-constructible.any.js
.
Metadata
Metadata
Assignees
Labels
eventsIssues and PRs related to the events subsystem / EventEmitter.Issues and PRs related to the events subsystem / EventEmitter.web-standardsIssues and PRs related to Web APIsIssues and PRs related to Web APIs