From 4dd4f6c9248a272dda5fb7c22e01edf41f7cb388 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 25 May 2022 17:24:03 +0200 Subject: [PATCH] doc: document `signal` option for `EventTarget#addEventListener` Refs: https://github.com/nodejs/node/pull/36258 PR-URL: https://github.com/nodejs/node/pull/43170 Reviewed-By: Colin Ihrig Reviewed-By: Masashi Hirano Reviewed-By: Luigi Pinca --- doc/api/events.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/api/events.md b/doc/api/events.md index ef3a8530c2bb84..5192b051231921 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1578,6 +1578,10 @@ changes: * `type` {string} @@ -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.