summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/wasm/serialization/module/resources/broadcastchannel-sharedworker.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/wasm/serialization/module/resources/broadcastchannel-sharedworker.js')
-rw-r--r--testing/web-platform/tests/wasm/serialization/module/resources/broadcastchannel-sharedworker.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/testing/web-platform/tests/wasm/serialization/module/resources/broadcastchannel-sharedworker.js b/testing/web-platform/tests/wasm/serialization/module/resources/broadcastchannel-sharedworker.js
new file mode 100644
index 0000000000..310e0e9358
--- /dev/null
+++ b/testing/web-platform/tests/wasm/serialization/module/resources/broadcastchannel-sharedworker.js
@@ -0,0 +1,7 @@
+const channel = new BroadcastChannel("anne was here");
+channel.onmessageerror = ({ data }) => {
+ if(data === null) {
+ channel.postMessage("sw-success");
+ }
+}
+channel.postMessage("hi");