Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /web-locks/crashtests/worker-termination.https.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="test-wait">
<meta charset="utf-8">
<script>
var worker = new Worker(URL.createObjectURL(new Blob([`
postMessage("hi");
(async () => {
const abort = new AbortController()
await navigator.locks.request("weblock_0", { signal: abort.signal }, () => {})
})()
`])));
worker.onmessage = () => {
worker.terminate();
document.documentElement.classList.remove("test-wait");
};
</script>