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