summaryrefslogtreecommitdiff
path: root/ext/web/03_abort_signal.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/web/03_abort_signal.js')
-rw-r--r--ext/web/03_abort_signal.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/web/03_abort_signal.js b/ext/web/03_abort_signal.js
index 6b278ba07..d46291b14 100644
--- a/ext/web/03_abort_signal.js
+++ b/ext/web/03_abort_signal.js
@@ -85,6 +85,13 @@
webidl.assertBranded(this, AbortSignal);
return this[abortReason];
}
+
+ throwIfAborted() {
+ webidl.assertBranded(this, AbortSignal);
+ if (this[abortReason] !== undefined) {
+ throw this[abortReason];
+ }
+ }
}
defineEventHandler(AbortSignal.prototype, "abort");