Nuestros voluntarios aún no han traducido este artículo al Español. ¡Únete a nosotros y ayúdanos a traducirlo!
También puedes leer el artículo en English (US).

The Navigator.serviceWorker read-only property returns the ServiceWorkerContainer object for the associated document, which provides access to registration, removal, upgrade, and communication with the ServiceWorker.

Syntax

var workerContainerInstance = navigator.serviceWorker;

Value

ServiceWorkerContainer     

Examples

This code checks if the browser supports service workers.

if ('serviceWorker' in navigator) {
  // Supported!
}

Specifications

Specification Status Comment
Service Workers
The definition of 'navigator.serviceWorker' in that specification.
Working Draft Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support4017441 No2711.1
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support404017442711.1 ?

1. Service Workers have been disabled in the Firefox 45 and 52 Extended Support Releases

See also

Etiquetas y colaboradores del documento

Colaboradores en esta página: ExE-Boss, jpmedley, rowan_m, chrisdavidmills, Ehsan, Sebastianz, teoli, kscarfone
Última actualización por: ExE-Boss,