24 lines
600 B
HTML
24 lines
600 B
HTML
<!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>
|