[w3c/ServiceWorker] Error handling inconsistent with other Workers (#1519)

From what I've been able to tell, there's no way to get any kind of information about errors from outside the ServiceWorker's context.  This is made more confusing by the fact that `ServiceWorker` instances extend from `AbstractWorker` and thus have an `onerror` handler which, as far as I can tell, never fires.

While such a feature would not necessarily be helpful during a navigation-triggered update, it would be very useful for initial registration/installation and any updates triggered by calling `update()` on the appropriate `ServiceWorkerRegistration` object.  This could help, for example, when trying to diagnose why a ServiceWorker's state changes in an unexpected way.

Since there are cases where a ServiceWorker can be terminated prior to it being able to send/store errors (for example if the SW OOMs, the browser times out handling of `install` and/or `activate` events, etc.), being able to capture such errors from outside the ServiceWorker's scope is the only way a developer might discover such issues.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1519

Received on Tuesday, 23 June 2020 15:13:00 UTC