From fe22837345c24268e2a15d1494b38b642da276fe Mon Sep 17 00:00:00 2001 From: Josh Kelley Date: Fri, 7 Nov 2025 16:23:03 -0500 Subject: [PATCH] doc: add docs on NodeEventTarget While researching EventEmitter versus Node.js's EventTarget versus DOM EventTarget, I found these docs on NodeEventTarget and was confused when I couldn't find NodeEventTarget itself. As far as I can tell, NodeEventTarget is used exactly once - by MessagePort. This makes me wonder if NodeEventTarget should be deprecated and/or become undocumented - but these docs are a minimal, hopefully helpful step if that isn't desirable. --- doc/api/events.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/events.md b/doc/api/events.md index 3994968031428e..a1eaad126fec58 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -2482,6 +2482,9 @@ added: v14.5.0 The `NodeEventTarget` is a Node.js-specific extension to `EventTarget` that emulates a subset of the `EventEmitter` API. +`NodeEventTarget` is not part of the Node.js public API itself but is implemented +by some Node.js classes. + #### `nodeEventTarget.addListener(type, listener)`