angular-docs-cn/tools
Alex Rickabaugh b9a91a5e74 fix(service-worker): don't crash if SW not supported
Currently a bug exists where attempting to inject SwPush crashes the
application if Service Workers are unsupported. This happens because
SwPush doesn't properly detect that navigator.serviceWorker isn't
set.

This change ensures that all passive observation of SwPush and
SwUpdate doesn't cause crashes, and that calling methods to perform
actions on them results in rejected Promises. It's up to applications
to detect when those services are not available, and refrain from
attempting to use them.

To that end, this change also adds an `isSupported` getter to both
services, so users don't have to rely on feature detection directly
with browser APIs. Currently this simply detects whether the SW API
is present, but in the future it will be expanded to detect whether
a particular browser supports specific APIs (such as push
notifications, for example).
2017-12-01 14:18:16 -08:00
..
build build: update npm dependencies (#19328) 2017-09-22 13:20:52 -07:00
cjs-jasmine revert: feat(elements): implement `@angular/elements` #19469 (#20152) 2017-11-03 15:54:54 -07:00
code.angularjs.org build: use subshells when changing directories 2017-05-12 12:19:51 -07:00
gulp-tasks feat(common): add locale id parameter to `registerLocaleData` (#20623) 2017-11-27 17:00:06 -06:00
karma build: update npm dependencies (#19328) 2017-09-22 13:20:52 -07:00
npm build: remove local yarn (#19981) 2017-11-02 15:11:34 -07:00
public_api_guard fix(service-worker): don't crash if SW not supported 2017-12-01 14:18:16 -08:00
source-map-test build: update npm dependencies (#19328) 2017-09-22 13:20:52 -07:00
travis build: update npm dependencies (#19328) 2017-09-22 13:20:52 -07:00
tree-shaking-test refactor: update paths from modules/@angular to packages 2017-03-08 16:29:28 -08:00
tsc-watch build: remove references to `tsc-wrapped` (#19298) 2017-09-21 13:55:52 -07:00
tslint build: update rollup lint rule from bad merge (#20047) 2017-10-30 23:43:49 -04:00
validate-commit-message revert: feat(elements): implement `@angular/elements` #19469 (#20152) 2017-11-03 15:54:54 -07:00
bazel.rc build: Upgrade to TypeScript 2.5 (#20175) 2017-11-15 18:12:16 -06:00
check-environment.js build: update npm dependencies (#19328) 2017-09-22 13:20:52 -07:00
chromedriverpatch.js refactor: add license header to JS files & format files (#12081) 2016-10-04 20:39:20 -07:00
jsconfig.json chore(vscode): add jsconfig.json and remove .settings dir 2015-10-29 13:53:21 +00:00
tsconfig.json refactor(compiler-cli): move ngc-wrapped to packages/bazel (#18733) 2017-08-23 11:34:51 -05:00
types.d.ts fix(fakeAsync): have fakeAsync use Proxy zone. (#10797) 2016-08-19 12:10:53 -07:00
utils.inc feat(bundle): add script to push bundles to code.angularjs.org 2015-04-14 14:50:53 -07:00