register method

Future<ServiceWorkerRegistration> register(
  1. String url, [
  2. Map? options
])

Implementation

Future<ServiceWorkerRegistration> register(String url, [Map? options]) {
  var options_dict = null;
  if (options != null) {
    options_dict = convertDartToNative_Dictionary(options);
  }
  return promiseToFuture<ServiceWorkerRegistration>(
    JS(
      "creates:ServiceWorkerRegistration;",
      "#.register(#, #)",
      this,
      url,
      options_dict,
    ),
  );
}