Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /wasm/serialization/arraybuffer/transfer.window.html - WPT Dashboard Interop Dashboard
test(() => {
const buffer = new WebAssembly.Memory({initial: 4}).buffer;
postMessage(buffer, '*');
}, "Serializing a WebAssembly.Memory-backed ArrayBuffer works");
test(() => {
const buffer = new WebAssembly.Memory({initial: 4}).buffer;
assert_throws_js(TypeError, () => {
postMessage('foo', '*', [buffer]);
});
}, "Transfering a WebAssembly.Memory-backed ArrayBuffer throws");