Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

  • This WPT test may be referenced by the following Test IDs:
<!doctype html>
<title>Test AudioWorkletNode subclass with parameters</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
class Extended extends AudioWorkletNode {}
const modulePath = 'processors/gain-processor.js';
promise_test(async () => {
const context = new AudioContext();
await context.audioWorklet.addModule(modulePath);
const node = new Extended(context, 'gain');
assert_equals(Object.getPrototypeOf(node), Extended.prototype);
});
</script>