[go: nahoru, domu]

Skip to content

Commit

Permalink
Adds JSDocs for the handleFetch parameter (GoogleChrome#723)
Browse files Browse the repository at this point in the history
* Adds JSDocs for the handleFetch parameter

* Linting fixes.
  • Loading branch information
jeffposnick committed Aug 9, 2017
1 parent a839199 commit e1c1f4b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/workbox-routing/src/lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ import normalizeHandler from './normalize-handler';
*/
class Router {
/**
* Start with an empty array of routes, and set up the fetch handler.
* Start with an empty array of routes, and by default, sets up the `fetch`
* handler.
*
* @param {Boolean} [handleFetch=true] Whether or not the Router should
* register a `fetch` handler and respond to requests. This can be set to
* `false` in a development environment, to prevent the service worker
* from responding with cached responses.
*/
constructor({handleFetch} = {}) {
if (typeof handleFetch === 'undefined') {
Expand Down

0 comments on commit e1c1f4b

Please sign in to comment.