mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 02:03:06 -05:00
28 lines
837 B
Text
28 lines
837 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/#worker
|
|
[Exposed=(Window,DedicatedWorker,SharedWorker)]
|
|
interface Worker : EventTarget {
|
|
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;
|