ladybird/Userland/Libraries/LibWeb/HTML/Worker.idl
Jamie Mansfield 3440d2b843 LibWeb: Implement AbstractWorker
This effectively implements Worker.onerror, and in future
SharedWorker.onerror.
2024-09-02 13:10:44 +02:00

26 lines
805 B
Text

#import <DOM/EventTarget.idl>
#import <DOM/EventHandler.idl>
#import <HTML/AbstractWorker.idl>
#import <HTML/MessagePort.idl>
// https://html.spec.whatwg.org/#worker
[Exposed=(Window,DedicatedWorker,SharedWorker)]
interface Worker : EventTarget {
constructor(DOMString scriptURL, optional WorkerOptions options = {});
undefined terminate();
// FIXME: IDL overload issue here
// FIXME: undefined postMessage(any message, sequence<object> 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 = "";
};
Worker includes AbstractWorker;