From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/api/navigator/serviceworker/index.html | 97 ++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 files/zh-cn/web/api/navigator/serviceworker/index.html (limited to 'files/zh-cn/web/api/navigator/serviceworker') diff --git a/files/zh-cn/web/api/navigator/serviceworker/index.html b/files/zh-cn/web/api/navigator/serviceworker/index.html new file mode 100644 index 0000000000..16cf2ac51d --- /dev/null +++ b/files/zh-cn/web/api/navigator/serviceworker/index.html @@ -0,0 +1,97 @@ +--- +title: Navigator.serviceWorker +slug: Web/API/Navigator/serviceWorker +translation_of: Web/API/Navigator/serviceWorker +--- +

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

+ +

Navigator.serviceWorker 只读属性,返回 关联文件 的 {{domxref("ServiceWorkerContainer")}} 对象,它提供对{{domxref("ServiceWorker")}} 的注册,删除,升级和通信的访问。。

+ +

语法

+ +
let workerContainerInstance = navigator.serviceWorker;
+
+ +

+ +

{{domxref("ServiceWorkerContainer")}}.

+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Service Workers', '#navigator-service-worker', 'navigator.serviceWorker')}}{{Spec2('Service Workers')}}Initial definition.
+ +

浏览器兼容性

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatChrome(40.0)}}{{ CompatGeckoDesktop("44.0") }}[1]{{CompatNo}}24{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)Firefox OSIE MobileOpera MobileSafari MobileChrome for Android
Basic support{{CompatUnknown}}{{ CompatGeckoMobile("44.0") }}{{ CompatVersionUnknown }}{{CompatNo}}{{CompatUnknown}}{{CompatNo}}{{CompatUnknown}}
+
+ +

[1] Service workers (and Push) have been disabled in the Firefox 45 Extended Support Release (ESR.)

+ +

也可以看看

+ + -- cgit v1.2.3-54-g00ecf