1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

LibWeb: Start filling out BaseAudioContext/AudioContext interfaces

- Fills out both IDLs and implements some basic attributes/methods.
- No actual audio processing yet though :^)
This commit is contained in:
Daniel Adams 2023-06-27 13:34:51 -04:00 committed by Andreas Kling
parent 30e67721ae
commit 49e6414c58
Notes: sideshowbarker 2024-07-17 23:07:41 +09:00
8 changed files with 407 additions and 8 deletions

View file

@ -5,6 +5,7 @@
*/
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/HTML/EventNames.h>
#include <LibWeb/WebAudio/BaseAudioContext.h>
namespace Web::WebAudio {
@ -24,4 +25,14 @@ JS::ThrowCompletionOr<void> BaseAudioContext::initialize(JS::Realm& realm)
return {};
}
void BaseAudioContext::set_onstatechange(WebIDL::CallbackType* event_handler)
{
set_event_handler_attribute(HTML::EventNames::statechange, event_handler);
}
WebIDL::CallbackType* BaseAudioContext::onstatechange()
{
return event_handler_attribute(HTML::EventNames::statechange);
}
}