Skip to content

EventTarget is not DOM spec Compliant #54617

Description

@avivkeller

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    eventsIssues and PRs related to EventEmitter and the events module.web-standardsIssues and PRs related to web-platform APIs and standards compliance.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions