服务工作者 - 被 DevTools 阻止终止

Service workers - termination prevented by DevTools

在开发 service worker 时,我想测试当 service worker 被终止(然后被访问)时会发生什么。但是,如果我打开 DevTools 检查内容,我会看到:

Service Worker termination by a timeout timer was canceled because DevTools is attached.

是否有任何方法可以将 DevTools 设置为不阻止 'normal' 终止的发生?

我不这么认为,但您可以通过单击 StopApplication 面板中手动终止 service worker。