summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/Worker.idl
blob: a3e4eafb48121162b37d6c99826f9b5bd3fd4958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#import <DOM/EventTarget.idl>
#import <DOM/EventHandler.idl>

[Exposed=(Window), UseNewAKString]
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 = "";
};