summaryrefslogtreecommitdiff
path: root/op_crates/web/02_abort_signal.js
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2021-01-05 22:43:25 +0100
committerGitHub <noreply@github.com>2021-01-05 22:43:25 +0100
commit77048390392a30640ab1fb386a3a4a33094dac5e (patch)
treedc441903d0987b269d33a7bee2b4a8a268627ab4 /op_crates/web/02_abort_signal.js
parent096e0905769e7cd9ae3019e4bf511407ed6bff9b (diff)
fix: align AbortSignal to spec using WPT (#9007)
Diffstat (limited to 'op_crates/web/02_abort_signal.js')
-rw-r--r--op_crates/web/02_abort_signal.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/op_crates/web/02_abort_signal.js b/op_crates/web/02_abort_signal.js
index 5ee047c36..412dab835 100644
--- a/op_crates/web/02_abort_signal.js
+++ b/op_crates/web/02_abort_signal.js
@@ -1,6 +1,8 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
((window) => {
+ const { setIsTrusted } = window.__bootstrap.event;
+
const add = Symbol("add");
const signalAbort = Symbol("signalAbort");
const remove = Symbol("remove");
@@ -24,7 +26,9 @@
algorithm();
}
this.#abortAlgorithms.clear();
- this.dispatchEvent(new Event("abort"));
+ const event = new Event("abort");
+ setIsTrusted(event, true);
+ this.dispatchEvent(event);
}
[remove](algorithm) {