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 May 25, 2022
1 parent 30cb1bf commit a346572
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 a346572

Please sign in to comment.