workbox.routing. NavigationRoute
NavigationRoute makes it easy to create a Route that matches for browser navigation requests.
It will only match incoming Requests whose
mode
is set to navigate
.
You can optionally only apply this route to a subset of navigation requests by using one or both of the blacklist
and whitelist
parameters.
Constructor
NavigationRoute
new NavigationRoute(handler, options)
If both blacklist
and whiltelist
are provided, the blacklist
will take precedence and the request will not match this route.
The regular expressions in whitelist
and blacklist
are matched against the concatenated
pathname
and search
portions of the requested URL.
Parameter |
|||||||
---|---|---|---|---|---|---|---|
handler |
workbox.routing.Route~handlerCallback A callback function that returns a Promise resulting in a Response. |
||||||
options |
Object Values in
|
- Extends
- workbox.routing.Route