1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00
ladybird/Libraries/LibWeb/HTML/Worker.idl
Timothy Flynn 469d5ccc4b LibWeb: Add FIXME about Worker's constructor's scriptURL parameter
TrustedScriptURL is its own interface that we haven't implemented yet.
2025-05-02 17:48:02 -04:00

29 lines
950 B
Text

#import <DOM/EventTarget.idl>
#import <DOM/EventHandler.idl>
#import <HTML/AbstractWorker.idl>
#import <HTML/MessagePort.idl>
#import <Fetch/Request.idl>
// https://html.spec.whatwg.org/multipage/workers.html#worker
[Exposed=(Window,DedicatedWorker,SharedWorker)]
interface Worker : EventTarget {
// FIXME: "DOMString scriptURL" should be "(TrustedScriptURL or USVString) scriptURL".
constructor(DOMString scriptURL, optional WorkerOptions options = {});
undefined terminate();
undefined postMessage(any message, sequence<object> transfer);
undefined postMessage(any message, optional StructuredSerializeOptions options = {});
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
};
dictionary WorkerOptions {
WorkerType type = "classic";
RequestCredentials credentials = "same-origin";
DOMString name = "";
};
enum WorkerType { "classic", "module" };
Worker includes AbstractWorker;