mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 10:12:25 -05:00
28 lines
805 B
Text
28 lines
805 B
Text
#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] 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"
|
|
};
|