Skip to main content

configure

Function configure 

Source
pub fn configure(worker: ServiceWorker) -> Result<(), AlreadyConfigured>
Expand description

Fix this process’s service-worker setting. Call it once, at start, before the first page renders and before /sw.js is served.

One setting per process, because /sw.js is one URL per origin and every page’s registration must agree with what that URL serves.

§Errors

AlreadyConfigured if it was set before, or if a render or /sw.js already read the default; the setting in force stays.