如果你关闭页面a ServiceWorker 继续使用,但保持浏览器打开,我理解它应该仍在执行。考虑到 console.log 由于页面已关闭,消息不可用。
ServiceWorker
console.log
使用chrome URL: chrome:serviceworker-internals
chrome:serviceworker-internals