blob: 48f665821860598dac146b18dafb72fe75652577 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<script type="text/javascript">
var shared;
function init() {
shared = new SharedWorker("shared_worker.js");
shared.port.start();
for (let i = 0; i < 10; i++) shared.port.postMessage(["ok"]);
}
</script>
</head>
<body onload="init()">
<h1>A page with a shared worker</h1>
</body>
</html>
|