Definition
Service Workers Nightly defines ServiceWorkerGlobalScope
[Global=(Worker,ServiceWorker), Exposed=ServiceWorker, SecureContext]
interface ServiceWorkerGlobalScope : WorkerGlobalScope {
[SameObject] readonly attribute Clients clients;
[SameObject] readonly attribute ServiceWorkerRegistration registration;
[SameObject] readonly attribute ServiceWorker serviceWorker;
[NewObject] Promise<undefined> skipWaiting();
attribute EventHandler oninstall;
attribute EventHandler onactivate;
attribute EventHandler onfetch;
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
};
This interface is extended in the following specifications:
- Notifications API Standard
partial interface ServiceWorkerGlobalScope { attribute EventHandler onnotificationclick; attribute EventHandler onnotificationclose; };
- Background Fetch
partial interface ServiceWorkerGlobalScope { attribute EventHandler onbackgroundfetchsuccess; attribute EventHandler onbackgroundfetchfail; attribute EventHandler onbackgroundfetchabort; attribute EventHandler onbackgroundfetchclick; };
- Web Background Synchronization
partial interface ServiceWorkerGlobalScope { attribute EventHandler onsync; };
- Content Index
partial interface ServiceWorkerGlobalScope { attribute EventHandler oncontentdelete; };
- Cookie Store API
partial interface ServiceWorkerGlobalScope { [SameObject] readonly attribute CookieStore cookieStore; attribute EventHandler oncookiechange; };
- Web Periodic Background Synchronization
partial interface ServiceWorkerGlobalScope { attribute EventHandler onperiodicsync; };
- Payment Handler API
partial interface ServiceWorkerGlobalScope { attribute EventHandler oncanmakepayment; }; partial interface ServiceWorkerGlobalScope { attribute EventHandler onpaymentrequest; };
- Push API
[Exposed=ServiceWorker, SecureContext] partial interface ServiceWorkerGlobalScope { attribute EventHandler onpush; attribute EventHandler onpushsubscriptionchange; };
Consolidated IDL (across mixin and partials)
[Global=(Worker,ServiceWorker), Exposed=ServiceWorker, SecureContext]
interface ServiceWorkerGlobalScope : WorkerGlobalScope {
[SameObject] readonly attribute Clients clients;
[SameObject] readonly attribute ServiceWorkerRegistration registration;
[SameObject] readonly attribute ServiceWorker serviceWorker;
[NewObject] Promise<undefined> skipWaiting();
attribute EventHandler oninstall;
attribute EventHandler onactivate;
attribute EventHandler onfetch;
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
attribute EventHandler onnotificationclick;
attribute EventHandler onnotificationclose;
attribute EventHandler onbackgroundfetchsuccess;
attribute EventHandler onbackgroundfetchfail;
attribute EventHandler onbackgroundfetchabort;
attribute EventHandler onbackgroundfetchclick;
attribute EventHandler onsync;
attribute EventHandler oncontentdelete;
[SameObject] readonly attribute CookieStore cookieStore;
attribute EventHandler oncookiechange;
attribute EventHandler onperiodicsync;
attribute EventHandler oncanmakepayment;
attribute EventHandler onpaymentrequest;
attribute EventHandler onpush;
attribute EventHandler onpushsubscriptionchange;
};
Referring specifications
- Notifications API Standard refers to
ServiceWorkerGlobalScope
- Background Fetch refers to
ServiceWorkerGlobalScope
- Web Background Synchronization refers to
ServiceWorkerGlobalScope
- Content Index refers to
ServiceWorkerGlobalScope
- Cookie Store API refers to
ServiceWorkerGlobalScope
- Web Periodic Background Synchronization refers to
ServiceWorkerGlobalScope
- Payment Handler API refers to
ServiceWorkerGlobalScope
- Push API refers to
ServiceWorkerGlobalScope