register method

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]) =>
    promiseToFuture<Object, ServiceWorkerRegistration>(
        _callMethod(_delegate, 'register', [scriptURL, options]),
        ServiceWorkerRegistration._);