ladybird/Userland/Libraries/LibWeb/HTML/ServiceWorkerRegistration.idl
Andrew Kaster c77d9a2732 LibWeb: Start implementing serviceWorker.register
This is mostly the fun boilerplate. Actually creating the Job queue
to do the heavy lifting is next.
2024-09-20 22:41:24 +01:00

27 lines
892 B
Text

#import <DOM/EventTarget.idl>
#import <DOM/EventHandler.idl>
#import <HTML/ServiceWorker.idl>
// https://w3c.github.io/ServiceWorker/#serviceworkerregistration-interface
[SecureContext, Exposed=(Window,Worker)]
interface ServiceWorkerRegistration : EventTarget {
[FIXME] readonly attribute ServiceWorker? installing;
[FIXME] readonly attribute ServiceWorker? waiting;
[FIXME] readonly attribute ServiceWorker? active;
[FIXME, SameObject] readonly attribute NavigationPreloadManager navigationPreload;
[FIXME] readonly attribute USVString scope;
[FIXME] readonly attribute ServiceWorkerUpdateViaCache updateViaCache;
[FIXME, NewObject] Promise<undefined> update();
[FIXME, NewObject] Promise<boolean> unregister();
// event
[FIXME] attribute EventHandler onupdatefound;
};
enum ServiceWorkerUpdateViaCache {
"imports",
"all",
"none"
};