Skip to content

Commit a346572

Browse files
authoredMay 25, 2022
doc: document signal option for EventTarget#addEventListener
Refs: nodejs#36258 PR-URL: nodejs#43170 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Masashi Hirano <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 30cb1bf commit a346572

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎doc/api/events.md

+6
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,10 @@ changes:
15871587

15881588
<!-- YAML
15891589
added: v14.5.0
1590+
changes:
1591+
- version: v15.4.0
1592+
pr-url: https://github.com/nodejs/node/pull/36258
1593+
description: add support for `signal` option.
15901594
-->
15911595

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.