angular-docs-cn/packages/service-worker
Hoel IRIS 81c2a94310 fix(service-worker): avoid uncaught rejection warning when registration fails (#30876)
Service worker API `navigator.serviceWorker.register` can fail in multiple ways.
For example, in Chrome, with an unstable network connection you can have the
following error: `An unknown error occurred when fetching the script.`

In the current state, it creates an `Uncaught (in promise) TypeError:` style of
error, which cannot be caught by the user on his own.

I think it's better to log the error over raising an error that cannot be
caught.

PR Close #30876
2019-06-07 08:46:25 -07:00
..
cli build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
config build: remove unreferenced tsconfig-build.json files (#30858) 2019-06-05 09:03:36 -07:00
src fix(service-worker): avoid uncaught rejection warning when registration fails (#30876) 2019-06-07 08:46:25 -07:00
test fix(service-worker): avoid uncaught rejection warning when registration fails (#30876) 2019-06-07 08:46:25 -07:00
testing build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
worker feat(service-worker): support bypassing SW with specific header/query param (#30010) 2019-04-25 13:09:44 -07:00
BUILD.bazel build: update to nodejs rules 0.27 (#29210) 2019-03-14 19:35:00 -07:00
PACKAGE.md docs: add package doc files (#26047) 2018-10-05 15:42:14 -07:00
index.ts
package.json feat: update the package output of build.sh to APF v6 (#22808) 2018-03-18 09:33:51 -07:00
public_api.ts
safety-worker.js feat(service-worker): add helper script which will uninstall SW (#21863) 2018-01-30 11:43:03 -08:00