Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2021-11-24 18:28:30 +0300
committerJames M Snell <jasnell@gmail.com>2021-12-10 18:51:41 +0300
commit3f72c72bbb89154bc15fbcef7ccbe3cf0dd017ba (patch)
treef00850045d79c068969f28771f6a7b9776788544 /doc/api/globals.md
parent03c983745706c4b05ff5579dcd4870f89d799d4b (diff)
lib: add abortSignal.throwIfAborted()
Refs: https://github.com/whatwg/dom/pull/1034 Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/40951 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'doc/api/globals.md')
-rw-r--r--doc/api/globals.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/api/globals.md b/doc/api/globals.md
index 3e47237714f..9df487a786a 100644
--- a/doc/api/globals.md
+++ b/doc/api/globals.md
@@ -191,6 +191,14 @@ ac.abort(new Error('boom!'));
console.log(ac.signal.reason); // Error('boom!');
```
+#### `abortSignal.throwIfAborted()`
+
+<!-- YAML
+added: REPLACEME
+-->
+
+If `abortSignal.aborted` is `true`, throws `abortSignal.reason`.
+
## Class: `Buffer`
<!-- YAML