WebIDLpedia

ServiceWorkerGlobalScope interface

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:

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