mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
feat(ext/web): implement AbortSignal.prototype.throwIfAborted()
(#13044)
See whatwg/dom#1034.
This commit is contained in:
parent
2926827726
commit
0f0dd5b7ec
3 changed files with 13 additions and 10 deletions
|
@ -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");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue