summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebAssembly/Module.idl
blob: eb03880b86e34671a3cf46ce02774cac619b0f76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
enum ImportExportKind {
    "function",
    "table",
    "memory",
    "global"
};

dictionary ModuleExportDescriptor {
    required USVString name;
    required ImportExportKind kind;
};

dictionary ModuleImportDescriptor {
    required USVString module;
    required USVString name;
    required ImportExportKind kind;
};

// https://webassembly.github.io/spec/js-api/#modules
[LegacyNamespace=WebAssembly, Exposed=*]
interface Module {
    constructor(BufferSource bytes);

    // FIXME: static sequence<ModuleExportDescriptor> exports(Module moduleObject);
    // FIXME: static sequence<ModuleImportDescriptor> imports(Module moduleObject);
    // FIXME: static sequence<ArrayBuffer> customSections(Module moduleObject, DOMString sectionName);
};