Interface ServiceWorkerUpdateState


@JsType(isNative=true, name="ng.ServiceWorkerUpdateState", namespace="<global>") public interface ServiceWorkerUpdateState
Template-friendly snapshot of update-related service-worker state.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Native error preserved for diagnostics.
    Stable failure code from the last update-related operation.
    double
    Last successful update-check time in epoch milliseconds.
    Latest observed service worker lifecycle phase.
    elemental2.dom.ServiceWorkerRegistration
    Registration associated with the latest update event.
    elemental2.dom.ServiceWorker
    Worker associated with the latest update event.
    boolean
    True while an explicit update check is in flight.
    boolean
    True when the active worker changed during the current page lifetime.
    boolean
    True when a waiting worker has been discovered.
    void
    setChecking(boolean checking)
    True while an explicit update check is in flight.
    void
    setControllerChanged(boolean controllerChanged)
    True when the active worker changed during the current page lifetime.
    void
    Native error preserved for diagnostics.
    void
    setErrorCode(String errorCode)
    Stable failure code from the last update-related operation.
    void
    setLastCheckedAt(double lastCheckedAt)
    Last successful update-check time in epoch milliseconds.
    void
    Latest observed service worker lifecycle phase.
    void
    setRegistration(elemental2.dom.ServiceWorkerRegistration registration)
    Registration associated with the latest update event.
    void
    setWaiting(boolean waiting)
    True when a waiting worker has been discovered.
    void
    setWorker(elemental2.dom.ServiceWorker worker)
    Worker associated with the latest update event.
  • Method Details

    • create

      @JsOverlay static ServiceWorkerUpdateState create()
    • getError

      @JsProperty Object getError()
      Native error preserved for diagnostics.
    • getErrorCode

      @JsProperty String getErrorCode()
      Stable failure code from the last update-related operation.
    • getLastCheckedAt

      @JsProperty double getLastCheckedAt()
      Last successful update-check time in epoch milliseconds.
    • getPhase

      @JsProperty String getPhase()
      Latest observed service worker lifecycle phase.
    • getRegistration

      @JsProperty elemental2.dom.ServiceWorkerRegistration getRegistration()
      Registration associated with the latest update event.
    • getWorker

      @JsProperty elemental2.dom.ServiceWorker getWorker()
      Worker associated with the latest update event.
    • isChecking

      @JsProperty boolean isChecking()
      True while an explicit update check is in flight.
    • isControllerChanged

      @JsProperty boolean isControllerChanged()
      True when the active worker changed during the current page lifetime.
    • isWaiting

      @JsProperty boolean isWaiting()
      True when a waiting worker has been discovered.
    • setChecking

      @JsProperty void setChecking(boolean checking)
      True while an explicit update check is in flight.
    • setControllerChanged

      @JsProperty void setControllerChanged(boolean controllerChanged)
      True when the active worker changed during the current page lifetime.
    • setError

      @JsProperty void setError(Object error)
      Native error preserved for diagnostics.
    • setErrorCode

      @JsProperty void setErrorCode(String errorCode)
      Stable failure code from the last update-related operation.
    • setLastCheckedAt

      @JsProperty void setLastCheckedAt(double lastCheckedAt)
      Last successful update-check time in epoch milliseconds.
    • setPhase

      @JsProperty void setPhase(String phase)
      Latest observed service worker lifecycle phase.
    • setRegistration

      @JsProperty void setRegistration(elemental2.dom.ServiceWorkerRegistration registration)
      Registration associated with the latest update event.
    • setWaiting

      @JsProperty void setWaiting(boolean waiting)
      True when a waiting worker has been discovered.
    • setWorker

      @JsProperty void setWorker(elemental2.dom.ServiceWorker worker)
      Worker associated with the latest update event.