LibWeb: Implement OscillatorNode.type

This is a simple getter and setter of the OscillatorType enum, with
error checking to not allow 'custom', as that should only be changed
through 'setPeriodicWave()'.
This commit is contained in:
Shannon Booth 2024-05-01 20:53:39 +12:00 committed by Andreas Kling
commit 099c9e4a7e
Notes: sideshowbarker 2024-07-16 20:08:14 +09:00
5 changed files with 61 additions and 2 deletions

View file

@ -22,7 +22,7 @@ dictionary OscillatorOptions : AudioNodeOptions {
[Exposed=Window]
interface OscillatorNode : AudioScheduledSourceNode {
constructor(BaseAudioContext context, optional OscillatorOptions options = {});
// FIXME: attribute OscillatorType type;
attribute OscillatorType type;
// FIXME: readonly attribute AudioParam frequency;
// FIXME: readonly attribute AudioParam detune;
// FIXME: undefined setPeriodicWave(PeriodicWave periodicWave);