Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
doc: document signal option for EventTarget#addEventListener
Refs: #36258
  • Loading branch information
aduh95 committed May 21, 2022
commit 096d43bc96ebfc2e5ce80a4c2c9800ac442db250
6 changes: 6 additions & 0 deletions doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -1587,6 +1587,10 @@ changes:

<!-- YAML
added: v14.5.0
changes:
- version: v15.4.0
pr-url: https://github.com/nodejs/node/pull/36258
description: add support for `signal` option.
-->

* `type` {string}
Expand All @@ -1599,6 +1603,8 @@ added: v14.5.0
**Default:** `false`.
* `capture` {boolean} Not directly used by Node.js. Added for API
completeness. **Default:** `false`.
* `signal` {AbortSignal} The listener will be removed when the given
AbortSignal object's `abort()` method is called.

Adds a new handler for the `type` event. Any given `listener` is added
only once per `type` and per `capture` option value.
Expand Down