Packages

trait SharedWorkerGlobalScope extends raw.EventTarget with WorkerGlobalScope

The SharedWorkerGlobalScope object (the SharedWorker global scope) is accessible through the self keyword. Some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the JavaScript Reference. See the complete list of functions available to workers.

MDN

Annotations
@JSType() @native()
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SharedWorkerGlobalScope
  2. WorkerGlobalScope
  3. WindowOrWorkerGlobalScope
  4. WindowTimers
  5. WindowBase64
  6. EventTarget
  7. Object
  8. Any
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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. def applicationCache: raw.ApplicationCache

    Returns the ApplicationCache object for the worker (see Using the application cache).

    Returns the ApplicationCache object for the worker (see Using the application cache).

    MDN

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def atob(encodedString: String): String

    Decodes a string of data which has been encoded using base-64 encoding.

    Decodes a string of data which has been encoded using base-64 encoding.

    Definition Classes
    WindowBase64
  9. def btoa(rawString: String): String

    Creates a base-64 encoded ASCII string from a "string" of binary data.

    Creates a base-64 encoded ASCII string from a "string" of binary data.

    Definition Classes
    WindowBase64
  10. def caches: UndefOr[CacheStorage]

    Returns the CacheStorage object associated with the current context.

    Returns the CacheStorage object associated with the current context. This object enables functionality such as storing assets for offline use, and generating custom responses to requests.

    MDN

    Definition Classes
    WindowOrWorkerGlobalScope
  11. def clearInterval(handle: Int): Unit

    Cancels repeated action which was set up using setInterval.

    Cancels repeated action which was set up using setInterval.

    MDN

    Definition Classes
    WindowTimers
  12. def clearTimeout(handle: Int): Unit

    Clears the delay set by window.setTimeout().

    Clears the delay set by window.setTimeout().

    MDN

    Definition Classes
    WindowTimers
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  14. def close(): Unit

    The close() method of the WorkerGlobalScope interface discards any tasks queued in the WorkerGlobalScope's event loop, effectively closing this particular scope.

    The close() method of the WorkerGlobalScope interface discards any tasks queued in the WorkerGlobalScope's event loop, effectively closing this particular scope.

    MDN

    Definition Classes
    WorkerGlobalScope
  15. def createImageBitmap(image: CreateImageBitmapInput, sx: Double, sy: Double, sw: Double, sh: Double, options: CreateImageBitmapOptions): Promise[ImageBitmap]
    Definition Classes
    WindowOrWorkerGlobalScope
  16. def createImageBitmap(image: CreateImageBitmapInput, sx: Double, sy: Double, sw: Double, sh: Double): Promise[ImageBitmap]
    Definition Classes
    WindowOrWorkerGlobalScope
  17. def createImageBitmap(image: CreateImageBitmapInput, options: CreateImageBitmapOptions): Promise[ImageBitmap]
    Definition Classes
    WindowOrWorkerGlobalScope
  18. def createImageBitmap(image: CreateImageBitmapInput): Promise[ImageBitmap]

    Accepts a variety of different image sources, and returns a Promise which resolves to an ImageBitmap.

    Accepts a variety of different image sources, and returns a Promise which resolves to an ImageBitmap. Optionally the source is cropped to the rectangle of pixels originating at (sx, sy) with width sw, and height sh.

    MDN

    Definition Classes
    WindowOrWorkerGlobalScope
  19. def crossOriginIsolated: Boolean

    Returns a boolean value that indicates whether a SharedArrayBuffer can be sent via a Window.postMessage() call.

    Returns a boolean value that indicates whether a SharedArrayBuffer can be sent via a Window.postMessage() call.

    MDN

    Definition Classes
    WindowOrWorkerGlobalScope
  20. 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
  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  23. def fetch(info: RequestInfo, init: RequestInit = null): Promise[Response]

    Starts the process of fetching a resource from the network.

    Starts the process of fetching a resource from the network.

    MDN

    Definition Classes
    WindowOrWorkerGlobalScope
  24. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  25. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  27. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. def importScripts(urls: Array[String]): Unit

    The importScripts() method of the WorkerGlobalScope interface imports one or more scripts into the worker's scope.

    The importScripts() method of the WorkerGlobalScope interface imports one or more scripts into the worker's scope.

    MDN

    Definition Classes
    WorkerGlobalScope
  29. def indexedDB: UndefOr[IDBFactory]

    Provides a mechanism for applications to asynchronously access capabilities of indexed databases.

    Provides a mechanism for applications to asynchronously access capabilities of indexed databases.

    MDN

    Definition Classes
    WindowOrWorkerGlobalScope
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  32. def isSecureContext: Boolean

    Returns a boolean indicating whether the current context is secure or not.

    Returns a boolean indicating whether the current context is secure or not.

    MDN

    Definition Classes
    WindowOrWorkerGlobalScope
  33. def location: WorkerLocation

    The location read-only property of the WorkerGlobalScope interface returns the WorkerLocation associated with the worker.

    The location read-only property of the WorkerGlobalScope interface returns the WorkerLocation associated with the worker. It is a specific location object, mostly a subset of the Location for browsing scopes, but adapted to workers.

    MDN

    Definition Classes
    WorkerGlobalScope
  34. def name: String

    Returns the name that the SharedWorker was (optionally) given when it was created.

    Returns the name that the SharedWorker was (optionally) given when it was created. This is the name that the SharedWorker constructor can pass to get a reference to the SharedWorkerGlobalScope.

    MDN

  35. def navigator: WorkerNavigator

    The navigator read-only property of the WorkerGlobalScope interface returns the WorkerNavigator associated with the worker.

    The navigator read-only property of the WorkerGlobalScope interface returns the WorkerNavigator associated with the worker. It is a specific navigator object, mostly a subset of the Navigator for browsing scopes, but adapted to workers.

    MDN

    Definition Classes
    WorkerGlobalScope
  36. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  38. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  39. val onError: Function1[raw.ErrorEvent, _]

    The onerror property of the WorkerGlobalScope interface represents an EventHandler to be called when the error event occurs and bubbles through the Worker.

    The onerror property of the WorkerGlobalScope interface represents an EventHandler to be called when the error event occurs and bubbles through the Worker.

    MDN

    Definition Classes
    WorkerGlobalScope
  40. val onconnect: Function1[ExtendableMessageEvent, _]

    An EventHandler representing the code to be called when the connect event is raised — that is, when a MessagePort connection is opened between the associated SharedWorker and the main thread.

    An EventHandler representing the code to be called when the connect event is raised — that is, when a MessagePort connection is opened between the associated SharedWorker and the main thread.

    MDN

  41. val onlanguagechange: Function1[raw.Event, _]

    The onlanguagechange property of the WorkerGlobalScope interface represents an EventHandler to be called when the languagechange event occurs and bubbles through the Worker.

    The onlanguagechange property of the WorkerGlobalScope interface represents an EventHandler to be called when the languagechange event occurs and bubbles through the Worker.

    MDN

    Definition Classes
    WorkerGlobalScope
  42. val onoffline: Function1[raw.Event, _]

    The onoffline property of the WorkerGlobalScope interface represents an EventHandler to be called when the offline event occurs and bubbles through the Worker.

    The onoffline property of the WorkerGlobalScope interface represents an EventHandler to be called when the offline event occurs and bubbles through the Worker.

    MDN

    Definition Classes
    WorkerGlobalScope
  43. val ononline: Function1[raw.Event, _]

    The ononline property of the WorkerGlobalScope interface represents an EventHandler to be called when the online event occurs and bubbles through the Worker.

    The ononline property of the WorkerGlobalScope interface represents an EventHandler to be called when the online event occurs and bubbles through the Worker.

    MDN

    Definition Classes
    WorkerGlobalScope
  44. def origin: String

    Returns the origin of the global scope, serialized as a string.

    Returns the origin of the global scope, serialized as a string.

    MDN

    Definition Classes
    WindowOrWorkerGlobalScope
  45. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  46. def queueMicrotask(function: Function0[Any]): Unit

    Enqueues a microtask—a short function to be executed after execution of the JavaScript code completes and control isn't being returned to a JavaScript caller, but before handling callbacks and other tasks.

    Enqueues a microtask—a short function to be executed after execution of the JavaScript code completes and control isn't being returned to a JavaScript caller, but before handling callbacks and other tasks.

    This lets your code run without interfering with other, possibly higher priority, code, but before the browser runtime regains control, potentially depending upon the work you need to complete.

    MDN

    Definition Classes
    WindowOrWorkerGlobalScope
  47. 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
  48. 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
  49. def self: SharedWorkerGlobalScope.this.type

    The self read-only property of the WorkerGlobalScope interface returns a reference to the WorkerGlobalScope itself.

    The self read-only property of the WorkerGlobalScope interface returns a reference to the WorkerGlobalScope itself. Most of the time it is a specific scope like DedicatedWorkerGlobalScope, SharedWorkerGlobalScope, or ServiceWorkerGlobalScope.

    MDN

    Definition Classes
    WorkerGlobalScope
  50. def setInterval(handler: Function0[Any], timeout: Double): Int

    Calls a function or executes a code snippet repeatedly, with a fixed time delay between each call to that function.

    Calls a function or executes a code snippet repeatedly, with a fixed time delay between each call to that function.

    MDN

    Definition Classes
    WindowTimers
  51. def setTimeout(handler: Function0[Any], timeout: Double): Int

    Calls a function or executes a code snippet after a specified delay.

    Calls a function or executes a code snippet after a specified delay.

    MDN

    Definition Classes
    WindowTimers
  52. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  53. def toLocaleString(): String
    Definition Classes
    Object
  54. def toString(): String
    Definition Classes
    AnyRef → Any
  55. def valueOf(): Any
    Definition Classes
    Object
  56. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  57. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  58. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from WorkerGlobalScope

Inherited from raw.WindowTimers

Inherited from raw.WindowBase64

Inherited from raw.EventTarget

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped