All Downloads are FREE. Search and download functionalities are using the official Maven repository.

elemental2.dom.ServiceWorkerRegistration Maven / Gradle / Ivy

There is a newer version: 2.27
Show newest version
package elemental2.dom;

import elemental2.promise.Promise;
import jsinterop.annotations.JsFunction;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;

@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public interface ServiceWorkerRegistration extends EventTarget {
  @JsFunction
  public interface OnupdatefoundFn {
    Object onInvoke(Event event);
  }

  @JsProperty
  ServiceWorker getActive();

  @JsProperty
  ServiceWorker getInstalling();

  @JsProperty
  NavigationPreloadManager getNavigationPreload();

  Promise getNotifications();

  Promise getNotifications(GetNotificationOptions filter);

  @JsProperty
  ServiceWorkerRegistration.OnupdatefoundFn getOnupdatefound();

  @JsProperty
  PushManager getPushManager();

  @JsProperty
  String getScope();

  @JsProperty
  SyncManager getSync();

  @JsProperty
  ServiceWorker getWaiting();

  @JsProperty
  void setActive(ServiceWorker active);

  @JsProperty
  void setInstalling(ServiceWorker installing);

  @JsProperty
  void setNavigationPreload(NavigationPreloadManager navigationPreload);

  @JsProperty
  void setOnupdatefound(ServiceWorkerRegistration.OnupdatefoundFn onupdatefound);

  @JsProperty
  void setPushManager(PushManager pushManager);

  @JsProperty
  void setScope(String scope);

  @JsProperty
  void setSync(SyncManager sync);

  @JsProperty
  void setWaiting(ServiceWorker waiting);

  Promise showNotification(String title, NotificationOptions options);

  Promise showNotification(String title);

  Promise unregister();

  Promise update();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy