blob: ad865b848f8e58c5567fafc5dc88c3353ab3d69c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<!doctype html>
<script>
var worker = new SharedWorker('./claim-shared-worker-fetch-worker.js');
function fetch_in_shared_worker(url) {
return new Promise((resolve) => {
worker.port.onmessage = (event) => {
resolve(event.data);
};
worker.port.postMessage(url);
});
}
</script>
|