summaryrefslogtreecommitdiffstats
path: root/vendor/web-sys/tests/wasm/event.js
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/web-sys/tests/wasm/event.js')
-rw-r--r--vendor/web-sys/tests/wasm/event.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/web-sys/tests/wasm/event.js b/vendor/web-sys/tests/wasm/event.js
new file mode 100644
index 000000000..48203ecf8
--- /dev/null
+++ b/vendor/web-sys/tests/wasm/event.js
@@ -0,0 +1,10 @@
+export function new_event() {
+ return new Promise(resolve => {
+ window.addEventListener("test-event", resolve);
+ window.dispatchEvent(new Event("test-event", {
+ bubbles: true,
+ cancelable: true,
+ composed: true,
+ }));
+ });
+}