blob: 4c66036304c6afadf06d454797ded5e40567ccbb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<!DOCTYPE HTML>
<html>
<head>
<title>Worklet error generator</title>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
</head>
<script>
"use strict";
const context = new AudioContext();
context.audioWorklet.addModule("test-syntaxerror-worklet.js").catch(
() => context.audioWorklet.addModule("test-error-worklet.mjs")
).then(() => {
const workletNode = new AudioWorkletNode(context, "error");
const oscillator = new OscillatorNode(context);
oscillator.connect(workletNode);
oscillator.start();
});
</script>
</html>
|