ladybird/Userland/Libraries/LibWeb/HTML/Worker.idl

21 lines
536 B
Text
Raw Normal View History

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