diff --git a/doc/api/events.md b/doc/api/events.md index 6f6f0d091872d1..c363e713a48902 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -2314,6 +2314,20 @@ equivalent `EventEmitter` API. The only difference between `addListener()` and `addEventListener()` is that `addListener()` will return a reference to the `EventTarget`. +#### `nodeEventTarget.emit(type, arg)` + + + +* `type` {string} +* `arg` {any} +* Returns: {boolean} `true` if event listeners registered for the `type` exist, + otherwise `false`. + +Node.js-specific extension to the `EventTarget` class that dispatches the +`arg` to the list of handlers for `type`. + #### `nodeEventTarget.eventNames()`