We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a669f4 commit aecedb5Copy full SHA for aecedb5
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/no-coop-coep.https.any.js
@@ -0,0 +1,18 @@
1
+test(() => {
2
+ const sab = new SharedArrayBuffer();
3
+ const channel = new MessageChannel();
4
+ assert_throws("DataCloneError", () => channel.port1.postMessage(sab));
5
+}, "SharedArrayBuffer over MessageChannel without COOP+COEP");
6
+
7
8
9
+ const channel = new BroadcastChannel("Is mir egal");
10
+ assert_throws("DataCloneError", () => channel.postMessage(sab));
11
+}, "SharedArrayBuffer over BroadcastChannel without COOP+COEP");
12
13
+if (self.GLOBAL.isWindow()) {
14
+ test(() => {
15
16
+ assert_throws("DataCloneError", () => self.postMessage(sab));
17
+ }, "SharedArrayBuffer over postMessage() without COOP+COEP");
18
+}
0 commit comments