WebIDLpedia

SharedWorker interface

Definition

HTML Standard defines SharedWorker



[Exposed=Window]
interface SharedWorker : EventTarget {
  constructor((TrustedScriptURL or USVString) scriptURL, optional (DOMString or WorkerOptions) options = {});

  readonly attribute MessagePort port;
};
SharedWorker includes AbstractWorker;
Consolidated IDL (across mixin and partials)


[Exposed=Window]
interface SharedWorker : EventTarget {
  constructor((TrustedScriptURL or USVString) scriptURL, optional (DOMString or WorkerOptions) options = {});

  readonly attribute MessagePort port;
  attribute EventHandler onerror;
};

Methods and attributes that return objects implementing SharedWorker

Referring IDL interfaces/dictionaries

Referring specifications