为什么会发生错误:“无法使用脚本 ('https:// .com/service-worker.js') 为范围 ('https:// .com/') 注册 ServiceWorker:无法访问存储。” ?
service-worker.js代码:
self.addEventListener('install', function() {
self.skipWaiting();
});
self.addEventListener('activate', function(event) {
event.waitUntil(self.clients.claim());
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
309 次 |
| 最近记录: |