Constructor

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 options have the following properties:

Parameter

blacklist

Optional

Array of RegExp

If any of these patterns match, the route will not handle the request (even if a whitelist RegExp matches).

whitelist

Optional

Array of RegExp

If any of these patterns match the URL's pathname and search parameter, the route will handle the request (assuming the blacklist doesn't match).

Extends
workbox.routing.Route