mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb/ServiceWorker: Implement ServiceWorkerGlobalScope event handlers
This commit is contained in:
parent
50b7e0807d
commit
3bb36d9379
Notes:
github-actions[bot]
2025-04-25 09:03:54 +00:00
Author: https://github.com/shannonbooth
Commit: 3bb36d9379
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4463
3 changed files with 83 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
||||
* Copyright (c) 2024-2025, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -18,6 +18,21 @@ class ServiceWorkerGlobalScope : public HTML::WorkerGlobalScope {
|
|||
public:
|
||||
virtual ~ServiceWorkerGlobalScope() override;
|
||||
|
||||
void set_oninstall(GC::Ptr<WebIDL::CallbackType>);
|
||||
GC::Ptr<WebIDL::CallbackType> oninstall();
|
||||
|
||||
void set_onactivate(GC::Ptr<WebIDL::CallbackType>);
|
||||
GC::Ptr<WebIDL::CallbackType> onactivate();
|
||||
|
||||
void set_onfetch(GC::Ptr<WebIDL::CallbackType>);
|
||||
GC::Ptr<WebIDL::CallbackType> onfetch();
|
||||
|
||||
void set_onmessage(GC::Ptr<WebIDL::CallbackType>);
|
||||
GC::Ptr<WebIDL::CallbackType> onmessage();
|
||||
|
||||
void set_onmessageerror(GC::Ptr<WebIDL::CallbackType>);
|
||||
GC::Ptr<WebIDL::CallbackType> onmessageerror();
|
||||
|
||||
protected:
|
||||
explicit ServiceWorkerGlobalScope(JS::Realm&, GC::Ref<Web::Page>);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue