diff --git a/doc/api/events.md b/doc/api/events.md index 104f2e22f2d541..7fe87d037e76ea 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 @@ -2298,7 +2297,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])`