mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-01 14:42:05 +00:00
LibWeb: Stub the ServiceWorkerContainer
interface
This commit is contained in:
parent
0c0a4a6042
commit
53ab6fa403
Notes:
github-actions[bot]
2024-08-25 10:54:07 +00:00
Author: https://github.com/tcl3
Commit: 53ab6fa403
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1173
8 changed files with 92 additions and 0 deletions
32
Userland/Libraries/LibWeb/HTML/ServiceWorkerContainer.cpp
Normal file
32
Userland/Libraries/LibWeb/HTML/ServiceWorkerContainer.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Tim Ledbetter <tim.ledbetter@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/ServiceWorkerContainerPrototype.h>
|
||||
#include <LibWeb/HTML/ServiceWorkerContainer.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(ServiceWorkerContainer);
|
||||
|
||||
ServiceWorkerContainer::ServiceWorkerContainer(JS::Realm& realm)
|
||||
: DOM::EventTarget(realm)
|
||||
{
|
||||
}
|
||||
|
||||
void ServiceWorkerContainer::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(ServiceWorkerContainer);
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<ServiceWorkerContainer> ServiceWorkerContainer::create(JS::Realm& realm)
|
||||
{
|
||||
return realm.heap().allocate<ServiceWorkerContainer>(realm, realm);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue