mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-27 12:46:06 +00:00
LibWeb: Add stub of ServiceWorker interface
This commit is contained in:
parent
75c7dbc5d2
commit
a0c07d1bb2
Notes:
github-actions[bot]
2024-09-20 21:42:46 +00:00
Author: https://github.com/ADKaster
Commit: a0c07d1bb2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1404
Reviewed-by: https://github.com/tcl3 ✅
6 changed files with 125 additions and 0 deletions
29
Userland/Libraries/LibWeb/HTML/ServiceWorker.idl
Normal file
29
Userland/Libraries/LibWeb/HTML/ServiceWorker.idl
Normal file
|
@ -0,0 +1,29 @@
|
|||
#import <DOM/EventTarget.idl>
|
||||
#import <DOM/EventHandler.idl>
|
||||
#import <HTML/AbstractWorker.idl>
|
||||
#import <HTML/MessagePort.idl>
|
||||
|
||||
// https://w3c.github.io/ServiceWorker/#serviceworker-interface
|
||||
[SecureContext, Exposed=(Window,Worker)]
|
||||
interface ServiceWorker : EventTarget {
|
||||
readonly attribute USVString scriptURL;
|
||||
[ImplementedAs=service_worker_state] readonly attribute ServiceWorkerState state;
|
||||
|
||||
// FIXME: IDL overload issue here
|
||||
// FIXME: undefined postMessage(any message, sequence<object> transfer);
|
||||
[FIXME] undefined postMessage(any message, optional StructuredSerializeOptions options = {});
|
||||
|
||||
// event
|
||||
attribute EventHandler onstatechange;
|
||||
};
|
||||
|
||||
ServiceWorker includes AbstractWorker;
|
||||
|
||||
enum ServiceWorkerState {
|
||||
"parsed",
|
||||
"installing",
|
||||
"installed",
|
||||
"activating",
|
||||
"activated",
|
||||
"redundant"
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue