Back to Content

ServiceWorkerRegistration: scope property

files/en-us/web/api/serviceworkerregistration/scope/index.md

latest948 B
Original Source

{{APIRef("Service Workers API")}}{{SecureContext_Header}} {{AvailableInWorkers}}

The scope read-only property of the {{domxref("ServiceWorkerRegistration")}} interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control. This is set using the scope parameter specified in the call to {{domxref('ServiceWorkerContainer.register()')}} which registered the service worker.

Value

Returns a string representing a URL that defines a service worker's registration scope.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also