register function

Creates or updates a ServiceWorkerRegistration for the given scriptURL. Currently available options are: scope: A USVString representing a URL that defines a service worker's registration scope; what range of URLs a service worker can control. This is usually a relative URL, and it defaults to '/' when not specified.

Implementation

Future<ServiceWorkerRegistration> register(String scriptURL,
        [ServiceWorkerRegisterOptions? options]) =>
    _self!.register(scriptURL, options);