DedicatedWorkerGlobalScope

Overview

The DedicatedWorkerGlobalScope object (the Worker 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 also: Functions available to workers.

Location

 

atob

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

 

method atob(parencodedData: dynamic): String

 

String atob(dynamic parencodedData)

 

func atob(_ parencodedData: dynamic) -> String

 

String atob(dynamic parencodedData)

 

Function atob(parencodedData As dynamic) As String

Parameters:

  • parencodedData:

btoa

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

 

method btoa(parstringToEncode: dynamic): String

 

String btoa(dynamic parstringToEncode)

 

func btoa(_ parstringToEncode: dynamic) -> String

 

String btoa(dynamic parstringToEncode)

 

Function btoa(parstringToEncode As dynamic) As String

Parameters:

  • parstringToEncode:

clearInterval

Cancels the repeated execution set using WindowTimers.setInterval().

 

method clearInterval(parintervalID: dynamic): dynamic

 

dynamic clearInterval(dynamic parintervalID)

 

func clearInterval(_ parintervalID: dynamic) -> dynamic

 

dynamic clearInterval(dynamic parintervalID)

 

Function clearInterval(parintervalID As dynamic) As dynamic

Parameters:

  • parintervalID:

clearTimeout

Cancels the repeated execution set using WindowTimers.setTimeout().

 

method clearTimeout(partimeoutID: dynamic): dynamic

 

dynamic clearTimeout(dynamic partimeoutID)

 

func clearTimeout(_ partimeoutID: dynamic) -> dynamic

 

dynamic clearTimeout(dynamic partimeoutID)

 

Function clearTimeout(partimeoutID As dynamic) As dynamic

Parameters:

  • partimeoutID:

importScripts

Imports one or more scripts into the worker's scope. You can specify as many as you'd like, separated by commas. For example: importScripts('foo.js', 'bar.js');

 

method importScripts: dynamic

 

dynamic importScripts()

 

func importScripts() -> dynamic

 

dynamic importScripts()

 

Function importScripts() As dynamic

name

 

property name: String read;

 

String name { get; }

 

var name: String { get{} }

 

String name { __get; }

 

ReadOnly Property name() As String

onmessage

 

property onmessage: EventListener read write;

 

EventListener onmessage { get; set; }

 

var onmessage: EventListener { get{} set{} }

 

EventListener onmessage { __get; __set; }

 

Property onmessage() As EventListener

onmessageerror

 

property onmessageerror: EventListener read write;

 

EventListener onmessageerror { get; set; }

 

var onmessageerror: EventListener { get{} set{} }

 

EventListener onmessageerror { __get; __set; }

 

Property onmessageerror() As EventListener

postMessage

Sends a message — which can consist of any JavaScript object — to the parent document that first spawned the worker.

 

method postMessage(paraMessage: dynamic; partransferList: dynamic): dynamic

 

dynamic postMessage(dynamic paraMessage, dynamic partransferList)

 

func postMessage(_ paraMessage: dynamic, _ partransferList: dynamic) -> dynamic

 

dynamic postMessage(dynamic paraMessage, dynamic partransferList)

 

Function postMessage(paraMessage As dynamic, partransferList As dynamic) As dynamic

Parameters:

  • paraMessage:
  • partransferList:

setInterval

 

method setInterval(parfunc: dynamic; parcode: dynamic; pardelay: dynamic; params args: array of dynamic): Int64

 

Int64 setInterval(dynamic parfunc, dynamic parcode, dynamic pardelay, params dynamic[] args)

 

func setInterval(_ parfunc: dynamic, _ parcode: dynamic, _ pardelay: dynamic, _ args: dynamic...) -> Int64

 

Int64 setInterval(dynamic parfunc, dynamic parcode, dynamic pardelay, dynamic[]... args)

 

Function setInterval(parfunc As dynamic, parcode As dynamic, pardelay As dynamic, ParamArray args As dynamic()) As Int64

Parameters:

  • parfunc:
  • parcode:
  • pardelay:
  • args:

setTimeout

Sets a delay for executing a function.

 

method setTimeout(parfunction: dynamic; parcode: dynamic; pardelay: dynamic; pararg1: dynamic): dynamic

 

dynamic setTimeout(dynamic parfunction, dynamic parcode, dynamic pardelay, dynamic pararg1)

 

func setTimeout(_ parfunction: dynamic, _ parcode: dynamic, _ pardelay: dynamic, _ pararg1: dynamic) -> dynamic

 

dynamic setTimeout(dynamic parfunction, dynamic parcode, dynamic pardelay, dynamic pararg1)

 

Function setTimeout(parfunction As dynamic, parcode As dynamic, pardelay As dynamic, pararg1 As dynamic) As dynamic

Parameters:

  • parfunction:
  • parcode:
  • pardelay:
  • pararg1:

 

name

 

property name: String read;

 

String name { get; }

 

var name: String { get{} }

 

String name { __get; }

 

ReadOnly Property name() As String

onmessage

 

property onmessage: EventListener read write;

 

EventListener onmessage { get; set; }

 

var onmessage: EventListener { get{} set{} }

 

EventListener onmessage { __get; __set; }

 

Property onmessage() As EventListener

onmessageerror

 

property onmessageerror: EventListener read write;

 

EventListener onmessageerror { get; set; }

 

var onmessageerror: EventListener { get{} set{} }

 

EventListener onmessageerror { __get; __set; }

 

Property onmessageerror() As EventListener

 

atob

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

 

method atob(parencodedData: dynamic): String

 

String atob(dynamic parencodedData)

 

func atob(_ parencodedData: dynamic) -> String

 

String atob(dynamic parencodedData)

 

Function atob(parencodedData As dynamic) As String

Parameters:

  • parencodedData:

btoa

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

 

method btoa(parstringToEncode: dynamic): String

 

String btoa(dynamic parstringToEncode)

 

func btoa(_ parstringToEncode: dynamic) -> String

 

String btoa(dynamic parstringToEncode)

 

Function btoa(parstringToEncode As dynamic) As String

Parameters:

  • parstringToEncode:

clearInterval

Cancels the repeated execution set using WindowTimers.setInterval().

 

method clearInterval(parintervalID: dynamic): dynamic

 

dynamic clearInterval(dynamic parintervalID)

 

func clearInterval(_ parintervalID: dynamic) -> dynamic

 

dynamic clearInterval(dynamic parintervalID)

 

Function clearInterval(parintervalID As dynamic) As dynamic

Parameters:

  • parintervalID:

clearTimeout

Cancels the repeated execution set using WindowTimers.setTimeout().

 

method clearTimeout(partimeoutID: dynamic): dynamic

 

dynamic clearTimeout(dynamic partimeoutID)

 

func clearTimeout(_ partimeoutID: dynamic) -> dynamic

 

dynamic clearTimeout(dynamic partimeoutID)

 

Function clearTimeout(partimeoutID As dynamic) As dynamic

Parameters:

  • partimeoutID:

importScripts

Imports one or more scripts into the worker's scope. You can specify as many as you'd like, separated by commas. For example: importScripts('foo.js', 'bar.js');

 

method importScripts: dynamic

 

dynamic importScripts()

 

func importScripts() -> dynamic

 

dynamic importScripts()

 

Function importScripts() As dynamic

postMessage

Sends a message — which can consist of any JavaScript object — to the parent document that first spawned the worker.

 

method postMessage(paraMessage: dynamic; partransferList: dynamic): dynamic

 

dynamic postMessage(dynamic paraMessage, dynamic partransferList)

 

func postMessage(_ paraMessage: dynamic, _ partransferList: dynamic) -> dynamic

 

dynamic postMessage(dynamic paraMessage, dynamic partransferList)

 

Function postMessage(paraMessage As dynamic, partransferList As dynamic) As dynamic

Parameters:

  • paraMessage:
  • partransferList:

setInterval

 

method setInterval(parfunc: dynamic; parcode: dynamic; pardelay: dynamic; params args: array of dynamic): Int64

 

Int64 setInterval(dynamic parfunc, dynamic parcode, dynamic pardelay, params dynamic[] args)

 

func setInterval(_ parfunc: dynamic, _ parcode: dynamic, _ pardelay: dynamic, _ args: dynamic...) -> Int64

 

Int64 setInterval(dynamic parfunc, dynamic parcode, dynamic pardelay, dynamic[]... args)

 

Function setInterval(parfunc As dynamic, parcode As dynamic, pardelay As dynamic, ParamArray args As dynamic()) As Int64

Parameters:

  • parfunc:
  • parcode:
  • pardelay:
  • args:

setTimeout

Sets a delay for executing a function.

 

method setTimeout(parfunction: dynamic; parcode: dynamic; pardelay: dynamic; pararg1: dynamic): dynamic

 

dynamic setTimeout(dynamic parfunction, dynamic parcode, dynamic pardelay, dynamic pararg1)

 

func setTimeout(_ parfunction: dynamic, _ parcode: dynamic, _ pardelay: dynamic, _ pararg1: dynamic) -> dynamic

 

dynamic setTimeout(dynamic parfunction, dynamic parcode, dynamic pardelay, dynamic pararg1)

 

Function setTimeout(parfunction As dynamic, parcode As dynamic, pardelay As dynamic, pararg1 As dynamic) As dynamic

Parameters:

  • parfunction:
  • parcode:
  • pardelay:
  • pararg1: