Files
serenity/Userland/Libraries/LibWeb/HTML/Worker.idl
Jamie Mansfield 25d3e1fe74 LibWeb: Implement AbstractWorker
This effectively implements Worker.onerror, and in future
SharedWorker.onerror.

(cherry picked from commit 3440d2b843331fca7392d29ea1b776935d1310de)
2024-11-09 16:08:01 -05:00

27 lines
805 B
Plaintext

#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;