Interface ServiceWorkerConfig


@JsType(isNative=true, name="ng.ServiceWorkerConfig", namespace="<global>") public interface ServiceWorkerConfig
Declarative defaults used when registering an application service worker. This config intentionally maps only browser registration options and safe observation policy. Activation, reload, cache strategy, push, and background sync remain explicit application or adapter policy.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    Register automatically when the runtime service is created.
    boolean
    Check for an updated worker after registration succeeds.
    void
    setAutoRegister(boolean autoRegister)
    Register automatically when the runtime service is created.
    void
    setCheckForUpdatesOnRegister(boolean checkForUpdatesOnRegister)
    Check for an updated worker after registration succeeds.
  • Method Details

    • create

      @JsOverlay static ServiceWorkerConfig create()
    • isAutoRegister

      @JsProperty boolean isAutoRegister()
      Register automatically when the runtime service is created.
    • isCheckForUpdatesOnRegister

      @JsProperty boolean isCheckForUpdatesOnRegister()
      Check for an updated worker after registration succeeds.
    • setAutoRegister

      @JsProperty void setAutoRegister(boolean autoRegister)
      Register automatically when the runtime service is created.
    • setCheckForUpdatesOnRegister

      @JsProperty void setCheckForUpdatesOnRegister(boolean checkForUpdatesOnRegister)
      Check for an updated worker after registration succeeds.