diff --git a/doc/api/events.md b/doc/api/events.md index 6656b2b2dae3de..49f706f5573364 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1911,9 +1911,8 @@ and cannot be used in place of an `EventEmitter` in most cases. ignored. 2. The `NodeEventTarget` does not emulate the full `EventEmitter` API. Specifically the `prependListener()`, `prependOnceListener()`, - `rawListeners()`, `setMaxListeners()`, `getMaxListeners()`, and - `errorMonitor` APIs are not emulated. The `'newListener'` and - `'removeListener'` events will also not be emitted. + `rawListeners()`, and `errorMonitor` APIs are not emulated. + The `'newListener'` and `'removeListener'` events will also not be emitted. 3. The `NodeEventTarget` does not implement any special default behavior for events with type `'error'`. 4. The `NodeEventTarget` supports `EventListener` objects as well as @@ -2318,7 +2317,7 @@ added: v14.5.0 The `NodeEventTarget` is a Node.js-specific extension to `EventTarget` that emulates a subset of the `EventEmitter` API. -#### `nodeEventTarget.addListener(type, listener[, options])` +#### `nodeEventTarget.addListener(type, listener)` + +* `n` {number} + +Node.js-specific extension to the `EventTarget` class that sets the number +of max event listeners as `n`. + +#### `nodeEventTarget.getMaxListeners()` + + + +* Returns: {number} + +Node.js-specific extension to the `EventTarget` class that returns the number +of max event listeners. + +#### `nodeEventTarget.off(type, listener[, options])`