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 <cjihrig@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
aduh95 authored and bengl committed May 30, 2022
1 parent 920d8c5 commit 76b4680
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 @@ -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

0 comments on commit 76b4680

Please sign in to comment.