WorkerGlobalScope
Overview
The WorkerGlobalScope interface of the Web Workers API is an interface representing the scope of any worker. Workers have no browsing context; this scope contains the information usually conveyed by Window objects — in this case event handlers, the console or the associated WorkerNavigator object. Each WorkerGlobalScope has its own event loop.
Location
- Reference: Island.fx
- Namespace: RemObjects.Elements.WebAssembly.DOM
- Platforms: WebAssembly
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:
caches
property caches: dynamic read;
dynamic caches { get; }
var caches: dynamic { get{} }
dynamic caches { __get; }
ReadOnly Property caches() As dynamic
clearInterval
Cancels the repeated execution set using WindowOrWorkerGlobalScope.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 delayed execution set using WindowOrWorkerGlobalScope.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:
close
Discards any tasks queued in the WorkerGlobalScope's event loop, effectively closing this particular scope. In newer browser versions, close() is available on DedicatedWorkerGlobalScope and SharedWorkerGlobalScope instead. This change was made to stop close() being available on service workers, as it isn't supposed to be used there and always throws an exception when called (see bug 1336043).
method close: dynamic
dynamic close()
func close() -> dynamic
dynamic close()
Function close() As dynamic
createImageBitmap
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.
method createImageBitmap(parimage: dynamic; parsx: dynamic; parsy: dynamic; parsw: dynamic; parsh: dynamic; paroptions: dynamic): Int32
Int32 createImageBitmap(dynamic parimage, dynamic parsx, dynamic parsy, dynamic parsw, dynamic parsh, dynamic paroptions)
func createImageBitmap(_ parimage: dynamic, _ parsx: dynamic, _ parsy: dynamic, _ parsw: dynamic, _ parsh: dynamic, _ paroptions: dynamic) -> Int32
Int32 createImageBitmap(dynamic parimage, dynamic parsx, dynamic parsy, dynamic parsw, dynamic parsh, dynamic paroptions)
Function createImageBitmap(parimage As dynamic, parsx As dynamic, parsy As dynamic, parsw As dynamic, parsh As dynamic, paroptions As dynamic) As Int32
Parameters:
- parimage:
- parsx:
- parsy:
- parsw:
- parsh:
- paroptions:
fetch
Starts the process of fetching a resource from the network.
method fetch(parresource: dynamic; parinit: dynamic; parmethod: dynamic; parheaders: dynamic; parbody: dynamic; parmode: dynamic; parcredentials: dynamic; parcache: dynamic; parredirect: dynamic; parreferrer: dynamic; parreferrerPolicy: dynamic; parintegrity: dynamic; parkeepalive: dynamic; parsignal: dynamic): dynamic
dynamic fetch(dynamic parresource, dynamic parinit, dynamic parmethod, dynamic parheaders, dynamic parbody, dynamic parmode, dynamic parcredentials, dynamic parcache, dynamic parredirect, dynamic parreferrer, dynamic parreferrerPolicy, dynamic parintegrity, dynamic parkeepalive, dynamic parsignal)
func fetch(_ parresource: dynamic, _ parinit: dynamic, _ parmethod: dynamic, _ parheaders: dynamic, _ parbody: dynamic, _ parmode: dynamic, _ parcredentials: dynamic, _ parcache: dynamic, _ parredirect: dynamic, _ parreferrer: dynamic, _ parreferrerPolicy: dynamic, _ parintegrity: dynamic, _ parkeepalive: dynamic, _ parsignal: dynamic) -> dynamic
dynamic fetch(dynamic parresource, dynamic parinit, dynamic parmethod, dynamic parheaders, dynamic parbody, dynamic parmode, dynamic parcredentials, dynamic parcache, dynamic parredirect, dynamic parreferrer, dynamic parreferrerPolicy, dynamic parintegrity, dynamic parkeepalive, dynamic parsignal)
Function fetch(parresource As dynamic, parinit As dynamic, parmethod As dynamic, parheaders As dynamic, parbody As dynamic, parmode As dynamic, parcredentials As dynamic, parcache As dynamic, parredirect As dynamic, parreferrer As dynamic, parreferrerPolicy As dynamic, parintegrity As dynamic, parkeepalive As dynamic, parsignal As dynamic) As dynamic
Parameters:
- parresource:
- parinit:
- parmethod:
- parheaders:
- parbody:
- parmode:
- parcredentials:
- parcache:
- parredirect:
- parreferrer:
- parreferrerPolicy:
- parintegrity:
- parkeepalive:
- parsignal:
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
indexedDB
property indexedDB: dynamic read;
dynamic indexedDB { get; }
var indexedDB: dynamic { get{} }
dynamic indexedDB { __get; }
ReadOnly Property indexedDB() As dynamic
isSecureContext
property isSecureContext: Boolean read;
Boolean isSecureContext { get; }
var isSecureContext: Boolean { get{} }
Boolean isSecureContext { __get; }
ReadOnly Property isSecureContext() As Boolean
location
property location: dynamic read;
dynamic location { get; }
var location: dynamic { get{} }
dynamic location { __get; }
ReadOnly Property location() As dynamic
origin
property origin: String read;
String origin { get; }
var origin: String { get{} }
String origin { __get; }
ReadOnly Property origin() As String
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
Schedules a function to execute in a given amount of time.
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:
caches
property caches: dynamic read;
dynamic caches { get; }
var caches: dynamic { get{} }
dynamic caches { __get; }
ReadOnly Property caches() As dynamic
indexedDB
property indexedDB: dynamic read;
dynamic indexedDB { get; }
var indexedDB: dynamic { get{} }
dynamic indexedDB { __get; }
ReadOnly Property indexedDB() As dynamic
isSecureContext
property isSecureContext: Boolean read;
Boolean isSecureContext { get; }
var isSecureContext: Boolean { get{} }
Boolean isSecureContext { __get; }
ReadOnly Property isSecureContext() As Boolean
location
property location: dynamic read;
dynamic location { get; }
var location: dynamic { get{} }
dynamic location { __get; }
ReadOnly Property location() As dynamic
origin
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 WindowOrWorkerGlobalScope.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 delayed execution set using WindowOrWorkerGlobalScope.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:
close
Discards any tasks queued in the WorkerGlobalScope's event loop, effectively closing this particular scope. In newer browser versions, close() is available on DedicatedWorkerGlobalScope and SharedWorkerGlobalScope instead. This change was made to stop close() being available on service workers, as it isn't supposed to be used there and always throws an exception when called (see bug 1336043).
method close: dynamic
dynamic close()
func close() -> dynamic
dynamic close()
Function close() As dynamic
createImageBitmap
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.
method createImageBitmap(parimage: dynamic; parsx: dynamic; parsy: dynamic; parsw: dynamic; parsh: dynamic; paroptions: dynamic): Int32
Int32 createImageBitmap(dynamic parimage, dynamic parsx, dynamic parsy, dynamic parsw, dynamic parsh, dynamic paroptions)
func createImageBitmap(_ parimage: dynamic, _ parsx: dynamic, _ parsy: dynamic, _ parsw: dynamic, _ parsh: dynamic, _ paroptions: dynamic) -> Int32
Int32 createImageBitmap(dynamic parimage, dynamic parsx, dynamic parsy, dynamic parsw, dynamic parsh, dynamic paroptions)
Function createImageBitmap(parimage As dynamic, parsx As dynamic, parsy As dynamic, parsw As dynamic, parsh As dynamic, paroptions As dynamic) As Int32
Parameters:
- parimage:
- parsx:
- parsy:
- parsw:
- parsh:
- paroptions:
fetch
Starts the process of fetching a resource from the network.
method fetch(parresource: dynamic; parinit: dynamic; parmethod: dynamic; parheaders: dynamic; parbody: dynamic; parmode: dynamic; parcredentials: dynamic; parcache: dynamic; parredirect: dynamic; parreferrer: dynamic; parreferrerPolicy: dynamic; parintegrity: dynamic; parkeepalive: dynamic; parsignal: dynamic): dynamic
dynamic fetch(dynamic parresource, dynamic parinit, dynamic parmethod, dynamic parheaders, dynamic parbody, dynamic parmode, dynamic parcredentials, dynamic parcache, dynamic parredirect, dynamic parreferrer, dynamic parreferrerPolicy, dynamic parintegrity, dynamic parkeepalive, dynamic parsignal)
func fetch(_ parresource: dynamic, _ parinit: dynamic, _ parmethod: dynamic, _ parheaders: dynamic, _ parbody: dynamic, _ parmode: dynamic, _ parcredentials: dynamic, _ parcache: dynamic, _ parredirect: dynamic, _ parreferrer: dynamic, _ parreferrerPolicy: dynamic, _ parintegrity: dynamic, _ parkeepalive: dynamic, _ parsignal: dynamic) -> dynamic
dynamic fetch(dynamic parresource, dynamic parinit, dynamic parmethod, dynamic parheaders, dynamic parbody, dynamic parmode, dynamic parcredentials, dynamic parcache, dynamic parredirect, dynamic parreferrer, dynamic parreferrerPolicy, dynamic parintegrity, dynamic parkeepalive, dynamic parsignal)
Function fetch(parresource As dynamic, parinit As dynamic, parmethod As dynamic, parheaders As dynamic, parbody As dynamic, parmode As dynamic, parcredentials As dynamic, parcache As dynamic, parredirect As dynamic, parreferrer As dynamic, parreferrerPolicy As dynamic, parintegrity As dynamic, parkeepalive As dynamic, parsignal As dynamic) As dynamic
Parameters:
- parresource:
- parinit:
- parmethod:
- parheaders:
- parbody:
- parmode:
- parcredentials:
- parcache:
- parredirect:
- parreferrer:
- parreferrerPolicy:
- parintegrity:
- parkeepalive:
- parsignal:
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
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
Schedules a function to execute in a given amount of time.
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: