workbox
Properties
backgroundSync
- See also
- module:workbox-background-sync
broadcastUpdate
- See also
- module:workbox-broadcast-update
cacheableResponse
- See also
- module:workbox-cacheable-response
core
- See also
- module:workbox-core
expiration
- See also
- module:workbox-expiration
googleAnalytics
- See also
- module:workbox-google-analytics
navigationPreload
- See also
- module:workbox-navigation-preload
precaching
- See also
- module:workbox-precaching
rangeRequests
- See also
- module:workbox-range-requests
recipes
- See also
- module:workbox-recipes
routing
- See also
- module:workbox-routing
strategies
- See also
- module:workbox-strategies
streams
- See also
- module:workbox-streams
Methods
loadModule
loadModule(moduleName)
Load a Workbox module by passing in the appropriate module name.
This is not generally needed unless you know there are modules that are dynamically used and you want to safe guard use of the module while the user may be offline.
Parameter |
|
---|---|
moduleName |
string |
setConfig
setConfig(options)
Updates the configuration options. You can specify whether to treat as a debug build and whether to use a CDN or a specific path when importing other workbox-modules
Parameter |
|||||||||
---|---|---|---|---|---|---|---|---|---|
options |
Optional Object Values in
|
Abstract type
ModulePathCallback
ModulePathCallback(moduleName, debug) returns string
A ModulePathCallback
function can be used to modify the modify the where
Workbox modules are loaded.
Parameter |
|
---|---|
moduleName |
string The name of the module to load (i.e. 'workbox-core', 'workbox-precaching' etc.). |
debug |
boolean When true, |
- Returns
-
string
This callback should return a path of module. This will be passed toimportScripts()
.