package sharedworkers
- Alphabetic
- Public
- All
Type Members
-
class
SharedWorker extends raw.EventTarget with 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.
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
- @JSType() @native() @JSGlobal()
var myWorker = new SharedWorker("aURL", name);
Example: -
trait
SharedWorkerGlobalScope extends raw.EventTarget with WorkerGlobalScope
The SharedWorkerGlobalScope object (the SharedWorker global scope) is accessible through the self keyword.
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()
Value Members
-
object
SharedWorkerGlobalScope extends Object
- Annotations
- @native() @JSGlobalScope()