-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex1.html
More file actions
50 lines (47 loc) · 1.65 KB
/
index1.html
File metadata and controls
50 lines (47 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<html>
<head>
<canvas id="one"></canvas>
<script>
if(window.location.protocol != "https:") {
window.location.protocol = "https";
}
function log(s) {
document.body.innerText += s + "\n";
}
//var d = document.createElement('div');
var htmlCanvas = document.getElementById("one");
//var offscreen = htmlCanvas.transferControlToOffscreen();
//var worker = new Worker("offscreencanvas.js");
//worker.postMessage({canvas: offscreen}, [offscreen]);
var keep = [];
async function start() {
log("starting...")
var context = new OfflineAudioContext(1, 128, 300000);
context.audioWorklet.addModule("fuck.js").then(async () => {
//var wb = new AudioWorkletNode(context, "b");
//var wc = new AudioWorkletNode(context, "c")
var wa = new AudioWorkletNode(context, "a");
var wb = new AudioWorkletNode(context, "b");
//wa.port.onmessage = (e) => { log(e.data);}
wa.port.onmessage = (e) => {
if(e.data === "lolzzz") {
await (new Promise((res) => setTimeout(res, 100)));
wa.port.postMessage("nnn")
//wa.postMessage("message" + e.data)
//log()
//wb.port.postMessage("hiiii!!!")
}
log(e.data);
}
await (new Promise((res) => setTimeout(res, 100)));
wa.port.postMessage("pwn");
//await (new Promise((res) => setTimeout(res, 100)));
//wa.port.postMessage("hey")
//wb.port.div(d);
});
}
</script>
</head>
<body onload="start()">
</body>
</html>