这篇翻译不完整。请帮忙从英语翻译这篇文章。
Navigator.serviceWorker
是个只读属性,返回 associated document 的 ServiceWorkerContainer
对象,这个对象提供注册、删除、更新以及和 ServiceWorker
通信的功能。
语法
var workerContainerInstance = navigator.serviceWorker;
值
规范
Specification | Status | Comment |
---|---|---|
Service Workers navigator.serviceWorker |
Working Draft | Initial definition. |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 40.0 | 44.0 (44.0)[1] | 未实现 | 24 | 未实现 |
Feature | Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | ? | 44.0 (44.0) | (Yes) | 未实现 | ? | 未实现 | ? |
[1] Service workers (and Push) have been disabled in the Firefox 45 Extended Support Release (ESR.)