Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /wasm/webapi/esm-integration/worker.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Testing WebAssembly worker</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script type=module>
setup({ single_test: true });
const worker = new Worker("resources/worker.wasm", { type: "module" });
worker.onmessage = (msg) => {
assert_equals(msg, 42);
done();
}
worker.onerror = () => {
assert_unreached("worker got an error");
}
</script>