WebIDLpedia

SharedWorker Global name

Definition

Realm execution contexts tied to the SharedWorker Global name use SharedWorkerGlobalScope as a basis for their global object.

This means their global object exposes the following members:


  [Replaceable] readonly attribute DOMString name;

  undefined close();

  attribute EventHandler onconnect;
  readonly attribute WorkerGlobalScope self;
  readonly attribute WorkerLocation location;
  readonly attribute WorkerNavigator navigator;
  undefined importScripts(ScriptURLString... urls);

  attribute OnErrorEventHandler onerror;
  attribute EventHandler onlanguagechange;
  attribute EventHandler onoffline;
  attribute EventHandler ononline;
  attribute EventHandler onrejectionhandled;
  attribute EventHandler onunhandledrejection;

  undefined addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});
  undefined removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {});
  boolean dispatchEvent(Event event);

The following interfaces are exposed exclusively in the corresponding realms:

The following interfaces are also exposed in the corresponding realms: