ServiceWorkerRegistration.scope

The scope read-only property of the ServiceWorkerRegistration interface returns a unique identifier for a service worker registration. The service worker must be on the same origin as the document that registers the ServiceWorker.

Note: This feature is available in Web Workers.

Syntax

var swScope = serviceWorkerRegistration.scope;

Specifications

Specification
Service Workers 1
# service-worker-registration-scope

Browser compatibility

BCD tables only load in the browser

See also