org.scalajs.dom.experimental.serviceworkers

ServiceWorkerContainer

trait ServiceWorkerContainer extends EventTarget

The ServiceWorkerContainer interface of the ServiceWorker API exposes the ServiceWorkerContainer. register(scriptURL, scope[, base]) method used to register service workers, and the ServiceWorkerContainer. controller property used to determine whether or not the current page is actively controlled.

MDN

Annotations
@RawJSType() @native()
Linear Supertypes
raw.EventTarget, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ServiceWorkerContainer
  2. EventTarget
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def addEventListener[T <: raw.Event](type: String, listener: Function1[T, _], options: EventListenerOptions): Unit

    The EventTarget.

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).

    This implementation accepts a settings object of type EventListenerOptions.

    MDN

    Definition Classes
    EventTarget
  7. def addEventListener[T <: raw.Event](type: String, listener: Function1[T, _], useCapture: Boolean = js.native): Unit

    The EventTarget.

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).

    MDN

    Definition Classes
    EventTarget
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def controller: ServiceWorker

    The ServiceWorkerContainer.

    The ServiceWorkerContainer.controller read-only property of the ServiceWorkerContainer interface returns the ServiceWorker whose state is activated (the same object returned by ServiceWorkerRegistration.active). This property returns null if the request is a force refresh (Shift + refresh) or if there is no active worker.

    MDN

  11. def dispatchEvent(evt: raw.Event): Boolean

    Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order.

    Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) apply to events dispatched manually with dispatchEvent().

    MDN

    Definition Classes
    EventTarget
  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  16. def getRegistration(scope: String = ""): Promise[UndefOr[ServiceWorkerRegistration]]

    Gets a ServiceWorkerRegistration object whose scope URL matches the document URL.

    Gets a ServiceWorkerRegistration object whose scope URL matches the document URL. If the method can't return a ServiceWorkerRegistration, it returns a Promise.

    MDN

  17. def getRegistrations(): Promise[Array[ServiceWorkerRegistration]]

    The getRegistrations() method of the ServiceWorkerContainer interface returns all ServiceWorkerRegistrations associated with a ServiceWorkerContainer in an array.

    The getRegistrations() method of the ServiceWorkerContainer interface returns all ServiceWorkerRegistrations associated with a ServiceWorkerContainer in an array. If the method can't return ServiceWorkerRegistrations, it returns a Promise.

    MDN

  18. def hasOwnProperty(v: String): Boolean

    Definition Classes
    Object
  19. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. def isPrototypeOf(v: Object): Boolean

    Definition Classes
    Object
  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. var oncontrollerchange: Function1[Event, _]

    The oncontrollerchange property of the ServiceWorkerContainer interface is an event handler fired whenever a controllerchange event occurs — when the document's associated ServiceWorkerRegistratin acquires a new ServiceWorkerRegistration.

    The oncontrollerchange property of the ServiceWorkerContainer interface is an event handler fired whenever a controllerchange event occurs — when the document's associated ServiceWorkerRegistratin acquires a new ServiceWorkerRegistration.active worker.

    MDN

  26. var onerror: Function1[raw.ErrorEvent, _]

    The onerror property of the ServiceWorkerContainer interface is an event handler fired whenever an error event occurs in the associated service workers.

    The onerror property of the ServiceWorkerContainer interface is an event handler fired whenever an error event occurs in the associated service workers.

    MDN

  27. var onmessage: Function1[MessageEvent, _]

    The onmessage property of the ServiceWorkerContainer interface is an event handler fired whenever a message event occurs — when incoming messages are received to the ServiceWorkerContainer object (e.

    The onmessage property of the ServiceWorkerContainer interface is an event handler fired whenever a message event occurs — when incoming messages are received to the ServiceWorkerContainer object (e.g., via a MessagePort.postMessage() call).

    MDN

  28. def propertyIsEnumerable(v: String): Boolean

    Definition Classes
    Object
  29. def ready: Promise[ServiceWorkerRegistration]

    The ready read-only property of the ServiceWorkerContainer interface defines whether a service worker is ready to control a page or not.

    The ready read-only property of the ServiceWorkerContainer interface defines whether a service worker is ready to control a page or not. It returns a Promise that will never reject, which resolves to a ServiceWorkerRegistration with an ServiceWorkerRegistration.active worker.

    MDN

  30. def register(scriptURL: String, options: Object = new js.Object()): Promise[ServiceWorkerRegistration]

    Creates or updates a ServiceWorkerRegistration for the given scriptURL.

    Creates or updates a ServiceWorkerRegistration for the given scriptURL. If successful, a service worker registration ties the provided script URL to a scope, which is subsequently used for navigation matching. If the method can't return a ServiceWorkerRegistration, it returns a Promise. You can call this method unconditionally from the controlled page, i.e., you don't need to first check whether there's an active registration.

    MDN

  31. def removeEventListener[T <: raw.Event](type: String, listener: Function1[T, _], options: EventListenerOptions): Unit

    Removes the event listener previously registered with EventTarget.

    Removes the event listener previously registered with EventTarget.addEventListener.

    This implementation accepts a settings object of type EventListenerOptions.

    MDN

    Definition Classes
    EventTarget
  32. def removeEventListener[T <: raw.Event](type: String, listener: Function1[T, _], useCapture: Boolean = js.native): Unit

    Removes the event listener previously registered with EventTarget.

    Removes the event listener previously registered with EventTarget.addEventListener.

    MDN

    Definition Classes
    EventTarget
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  34. def toLocaleString(): String

    Definition Classes
    Object
  35. def toString(): String

    Definition Classes
    AnyRef → Any
  36. def valueOf(): Any

    Definition Classes
    Object
  37. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from raw.EventTarget

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped