LibWeb: Add stubbed implementation for ServiceWorkerGlobalScope

This commit is contained in:
Shannon Booth 2024-11-30 18:35:45 +13:00 committed by Andreas Kling
commit cc11dcc9a1
Notes: github-actions[bot] 2024-11-30 10:20:37 +00:00
5 changed files with 65 additions and 0 deletions

View file

@ -0,0 +1,25 @@
/*
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/HTML/WorkerGlobalScope.h>
namespace Web::ServiceWorker {
// https://w3c.github.io/ServiceWorker/#serviceworkerglobalscope
class ServiceWorkerGlobalScope : public HTML::WorkerGlobalScope {
WEB_PLATFORM_OBJECT(ServiceWorkerGlobalScope, HTML::WorkerGlobalScope);
GC_DECLARE_ALLOCATOR(ServiceWorkerGlobalScope);
public:
virtual ~ServiceWorkerGlobalScope() override;
protected:
explicit ServiceWorkerGlobalScope(JS::Realm&, GC::Ref<Web::Page>);
};
}