From 096d43bc96ebfc2e5ce80a4c2c9800ac442db250 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sat, 21 May 2022 18:30:17 +0200 Subject: [PATCH] doc: document `signal` option for `EventTarget#addEventListener` Refs: https://github.com/nodejs/node/pull/36258 --- doc/api/events.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/api/events.md b/doc/api/events.md index 6cd5d47fdfe04a..3dfbd28e7d3108 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1587,6 +1587,10 @@ changes: * `type` {string} @@ -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.