2022-03-30 23:35:42 +03:00
|
|
|
#import <DOM/EventTarget.idl>
|
|
|
|
#import <DOM/EventHandler.idl>
|
2023-12-20 13:47:01 -07:00
|
|
|
#import <HTML/MessagePort.idl>
|
2022-03-30 23:35:42 +03:00
|
|
|
|
2023-11-07 19:29:22 -07:00
|
|
|
// https://html.spec.whatwg.org/#worker
|
2024-08-23 22:11:46 +01:00
|
|
|
[Exposed=(Window,DedicatedWorker,SharedWorker)]
|
2022-02-17 13:31:09 +01:00
|
|
|
interface Worker : EventTarget {
|
|
|
|
constructor(DOMString scriptURL, optional WorkerOptions options = {});
|
|
|
|
|
|
|
|
undefined terminate();
|
2023-12-20 13:47:01 -07:00
|
|
|
// FIXME: IDL overload issue here
|
|
|
|
// FIXME: undefined postMessage(any message, sequence<object> transfer);
|
|
|
|
undefined postMessage(any message, optional StructuredSerializeOptions options = {});
|
2022-02-17 13:31:09 +01:00
|
|
|
|
|
|
|
attribute EventHandler onmessage;
|
|
|
|
attribute EventHandler onmessageerror;
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary WorkerOptions {
|
|
|
|
USVString type = "classic";
|
|
|
|
USVString credentials = "same-origin";
|
|
|
|
DOMString name = "";
|
|
|
|
};
|