升级到Chrome 64后,我意识到当我在新标签页上加载页面时会出现此错误.
我无法确定它在服务工作者身上的位置.这是我运行fetch的代码:
self.addEventListener('fetch', function(event) {
if (event.request.url.startsWith(self.location.origin)) {
event.respondWith(
caches.match(event.request).then(function(response) {
return response || fetch(event.request).then(function(fetch_resp){
return fetch_resp;
});
})
);
}
});
Run Code Online (Sandbox Code Playgroud)
在这里,对服务工作者有更多了解的人能帮助我解决这个错误吗?
该$的jQuery是一个函数,但是你可以访问它的方法,如果它通过了一个对象".".有人可以解释一下,我可以用什么方式在函数中做到这一点func?
更清楚的是,我打算使用func ()以及func.each ()例如.