Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE HTML>
<html>
<head>
<title>Worklet error generator</title>
<!--
Any copyright is dedicated to the Public Domain.
-->
</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>