package js.html
extends EventTarget
extended by DedicatedWorkerGlobalScope, ServiceWorkerGlobalScope, SharedWorkerGlobalScope
Available on jsThe
WorkerGlobalScopeinterface 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 byWindowobjects — in this case event handlers, the console or the associatedWorkerNavigatorobject. EachWorkerGlobalScopehas its own event loop.Documentation WorkerGlobalScope by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
read only console:ConsoleReturns the Console associated with the worker.
read only indexedDB:Factoryread only location:WorkerLocationReturns 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.
read only navigator:WorkerNavigatorReturns 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.
onclose:FunctionIs an EventHandler representing the code to be called when the close event is raised.
onoffline:FunctionIs an EventHandler representing the code to be called when the offline event is raised.
ononline:FunctionIs an EventHandler representing the code to be called when the online event is raised.
read only performance:PerformanceReturns the Performance associated with the worker. It is a regular performance object, except that only a subset of its property and methods are available to workers.
read only self:WorkerGlobalScopeReturns a reference to the WorkerGlobalScope itself. Most of the time it is a specific scope like DedicatedWorkerGlobalScope, SharedWorkerGlobalScope or ServiceWorkerGlobalScope.
onerror:EitherType<Event, String> ‑> String ‑> Int ‑> Int ‑> Dynamic ‑> BoolIs an EventHandler representing the code to be called when the error event is raised.
atob (atob:String):StringThrows:
null |
DOMError |
|---|
btoa (btoa:String):StringThrows:
null |
DOMError |
|---|
clearInterval (handle:Int = 0):Void clearTimeout (handle:Int = 0):Voidclose ():VoidThrows:
null |
DOMError |
|---|
createImageBitmap (aImage:EitherType<ImageElement, EitherType<VideoElement, EitherType<CanvasElement, EitherType<Blob, EitherType<ImageData, EitherType<CanvasRenderingContext2D, ImageBitmap>>>>>>, aSx:Int, aSy:Int, aSw:Int, aSh:Int):Promise<ImageBitmap>createImageBitmap (aImage:EitherType<ImageElement, EitherType<VideoElement, EitherType<CanvasElement, EitherType<Blob, EitherType<ImageData, EitherType<CanvasRenderingContext2D, ImageBitmap>>>>>>):Promise<ImageBitmap>Throws:
null |
DOMError |
|---|
dump (?str:String):VoidAllows you to write a message to stdout — i.e. in your terminal. This is the same as Firefox's window.dump, but for workers.
fetch (input:EitherType<Request, String>, ?init:RequestInit):Promise<Response>Throws:
null |
DOMError |
|---|
importScripts (urls:Rest<String>):VoidThrows:
null |
DOMError |
|---|
setInterval (handler:String, ?timeout:Int, unused:Rest<Dynamic>):IntsetInterval (handler:Function, ?timeout:Int, arguments:Rest<Dynamic>):IntThrows:
null |
DOMError |
|---|
setTimeout (handler:String, timeout:Int = 0, unused:Rest<Dynamic>):Int setTimeout (handler:Function, timeout:Int = 0, arguments:Rest<Dynamic>):IntThrows:
null |
DOMError |
|---|
© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/WorkerGlobalScope.html