Class

org.scalajs.dom.experimental.sharedworkers

SharedWorker

Related Doc: package sharedworkers

Permalink

class SharedWorker extends raw.EventTarget with webworkers.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
@RawJSType() @native()
Example:
  1. var myWorker = new SharedWorker("aURL", name);
Linear Supertypes
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. All

Instance Constructors

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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addEventListener[T <: raw.Event](type: String, listener: Function1[T, _], useCapture: Boolean = js.native): Unit

    Permalink

    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
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def dispatchEvent(evt: raw.Event): Boolean

    Permalink

    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
  8. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  13. def hashCode(): Int

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

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

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

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. var onerror: Function1[raw.ErrorEvent, _]

    Permalink

    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
  20. def port: raw.MessagePort

    Permalink

    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

  21. def propertyIsEnumerable(v: String): Boolean

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

    Permalink

    Removes the event listener previously registered with EventTarget.addEventListener.

    Removes the event listener previously registered with EventTarget.addEventListener.

    MDN

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

    Permalink
    Definition Classes
    AnyRef
  24. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  27. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from raw.AbstractWorker

Inherited from raw.EventTarget

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped