Skip to content

Commit

Permalink
doc: document signal option for EventTarget#addEventListener
Browse files Browse the repository at this point in the history
Refs: #36258

PR-URL: #43170
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Masashi Hirano <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
aduh95 authored and danielleadams committed Jun 27, 2022
1 parent a212dc9 commit 1d1481c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -1578,6 +1578,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 @@ -1590,6 +1594,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

0 comments on commit 1d1481c

Please sign in to comment.