2025-11-18 16:49:02 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2025, Luke Wilde <luke@ladybird.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/Bindings/Intrinsics.h>
|
2026-04-18 10:54:06 +02:00
|
|
|
#include <LibWeb/Bindings/OfflineAudioCompletionEvent.h>
|
2025-11-18 16:49:02 +00:00
|
|
|
#include <LibWeb/WebAudio/OfflineAudioCompletionEvent.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::WebAudio {
|
|
|
|
|
|
|
|
|
|
GC_DEFINE_ALLOCATOR(OfflineAudioCompletionEvent);
|
|
|
|
|
|
2026-05-01 19:01:23 +02:00
|
|
|
WebIDL::ExceptionOr<GC::Ref<OfflineAudioCompletionEvent>> OfflineAudioCompletionEvent::construct_impl(JS::Realm& realm, FlyString const& event_name, Bindings::OfflineAudioCompletionEventInit const& event_init)
|
2025-11-18 16:49:02 +00:00
|
|
|
{
|
|
|
|
|
return realm.create<OfflineAudioCompletionEvent>(realm, event_name, event_init);
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-01 19:01:23 +02:00
|
|
|
OfflineAudioCompletionEvent::OfflineAudioCompletionEvent(JS::Realm& realm, FlyString const& event_name, Bindings::OfflineAudioCompletionEventInit const& event_init)
|
2025-11-18 16:49:02 +00:00
|
|
|
: DOM::Event(realm, event_name, event_init)
|
|
|
|
|
, m_rendered_buffer(event_init.rendered_buffer)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OfflineAudioCompletionEvent::~OfflineAudioCompletionEvent() = default;
|
|
|
|
|
|
|
|
|
|
void OfflineAudioCompletionEvent::initialize(JS::Realm& realm)
|
|
|
|
|
{
|
|
|
|
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(OfflineAudioCompletionEvent);
|
|
|
|
|
Base::initialize(realm);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OfflineAudioCompletionEvent::visit_edges(Cell::Visitor& visitor)
|
|
|
|
|
{
|
|
|
|
|
Base::visit_edges(visitor);
|
|
|
|
|
visitor.visit(m_rendered_buffer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|