Packages

class SharedWorker extends raw.EventTarget with AbstractWorker

The SharedWorker interface represents a specific kind of worker that can be accessed from several browsing contexts, such as several windows, iframes or even workers. They implement an interface different than dedicated workers and have a different global scope, SharedWorkerGlobalScope.

MDN

Annotations
@JSType() @native() @JSGlobal()
Example:
  1. var myWorker = new SharedWorker("aURL", name);
Linear Supertypes
AbstractWorker, raw.EventTarget, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SharedWorker
  2. AbstractWorker
  3. EventTarget
  4. Object
  5. Any
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SharedWorker(stringUrl: String, name: UndefOr[String] = js.native)

    The SharedWorker constructor creates a SharedWorker object that executes the script at the specified URL.This script must obey the same-origin policy.

    The SharedWorker constructor creates a SharedWorker object that executes the script at the specified URL.This script must obey the same-origin policy. If the URL has an invalid syntax or if the same-origin policy is violated, a DOMException of type SECURITY_ERR is thrown.

    stringUrl

    A DOMString representing the URL of the script the worker will execute. It must obey the same-origin policy.

    name

    An optional argument that specifies an existing SharedWorkerGlobalScope.name — if this is specified then that SharedWorkerGlobalScope will be used as the scope for this shared worker.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addEventListener[T <: raw.Event](type: String, listener: Function1[T, _], options: EventListenerOptions): Unit

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on.

    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
  5. def addEventListener[T <: raw.Event](type: String, listener: Function1[T, _], useCapture: Boolean = js.native): Unit

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on.

    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
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. 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
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. val onerror: Function1[raw.ErrorEvent, _]

    The AbstractWorker.onerror property represents an EventHandler, that is a function to be called when the error event occurs and bubbles through the Worker.

    The AbstractWorker.onerror property represents an EventHandler, that is a function to be called when the error event occurs and bubbles through the Worker.

    MDN

    Definition Classes
    AbstractWorker
  21. def port: raw.MessagePort

    The port property of the SharedWorker interface returns a MessagePort object used to communicate and control the shared worker.

    The port property of the SharedWorker interface returns a MessagePort object used to communicate and control the shared worker.

    MDN

  22. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  23. def removeEventListener[T <: raw.Event](type: String, listener: Function1[T, _], options: EventListenerOptions): Unit

    Removes the event listener previously registered with EventTarget.addEventListener.

    Removes the event listener previously registered with EventTarget.addEventListener.

    This implementation accepts a settings object of type EventListenerOptions.

    MDN

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

    Removes the event listener previously registered with EventTarget.addEventListener.

    Removes the event listener previously registered with EventTarget.addEventListener.

    MDN

    Definition Classes
    EventTarget
  25. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  26. def toLocaleString(): String
    Definition Classes
    Object
  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. def valueOf(): Any
    Definition Classes
    Object
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AbstractWorker

Inherited from raw.EventTarget

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped