mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00: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:
committed by
Andreas Kling
parent
30e67721ae
commit
49e6414c58
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user