Closed foolip closed 2 years ago
There are some issue with the Web IDL introduced in https://github.com/WebAudio/web-audio-api/pull/2462, which I noticed in https://github.com/web-platform-tests/wpt/pull/33888. What's currently in the spec:
[Exposed=Window] interface AudioRenderCapacity { undefined start(AudioRenderCapacityOptions options); undefined stop(); attribute EventHandler onupdate; }; dictionary AudioRenderCapacityOptions { double updateInterval = 1; }; [Exposed=Window] interface AudioRenderCapacityEvent { constructor (DOMString type, double timestamp, double averageLoad, double peakLoad, double underrunRatio); readonly attribute double timestamp; readonly attribute double averageLoad; readonly attribute double peakLoad; readonly attribute double underrunRatio; };
https://github.com/WebAudio/web-audio-api/pull/2485 was created automatically. Also, inheritance from EventTarget and Event are missing, and the event constructor is not in the style of other event constructors. It should be something like:
EventTarget
Event
[Exposed=Window] interface AudioRenderCapacity : EventTarget { undefined start(optional AudioRenderCapacityOptions options = {}); undefined stop(); attribute EventHandler onupdate; }; dictionary AudioRenderCapacityOptions { double updateInterval = 1; }; [Exposed=Window] interface AudioRenderCapacityEvent : Event { constructor (DOMString type, optional AudioRenderCapacityEventInit eventInitDict = {}); readonly attribute double timestamp; readonly attribute double averageLoad; readonly attribute double peakLoad; readonly attribute double underrunRatio; }; dictionary AudioRenderCapacityEventInit : EventInit { double timestamp = 0; double averageLoad = 0; double peakLoad = 0; double underrunRatio = 0; };
I tried to write a PR, but trying to get the indentation right in the web UI was too much of a hassle.
@hoch can you take a look?
Thanks for filing the issue, @foolip! I'll fix this soon.
There are some issue with the Web IDL introduced in https://github.com/WebAudio/web-audio-api/pull/2462, which I noticed in https://github.com/web-platform-tests/wpt/pull/33888. What's currently in the spec:
https://github.com/WebAudio/web-audio-api/pull/2485 was created automatically. Also, inheritance from
EventTarget
andEvent
are missing, and the event constructor is not in the style of other event constructors. It should be something like:I tried to write a PR, but trying to get the indentation right in the web UI was too much of a hassle.
@hoch can you take a look?