#import #import #import // https://html.spec.whatwg.org/#worker [Exposed=(Window)] interface Worker : EventTarget { constructor(DOMString scriptURL, optional WorkerOptions options = {}); undefined terminate(); // FIXME: IDL overload issue here // FIXME: undefined postMessage(any message, sequence transfer); undefined postMessage(any message, optional StructuredSerializeOptions options = {}); attribute EventHandler onmessage; attribute EventHandler onmessageerror; }; dictionary WorkerOptions { USVString type = "classic"; USVString credentials = "same-origin"; DOMString name = ""; };