mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
LibWeb: Port WebAssembly.Module to IDL
This commit is contained in:
parent
5c97ffb94f
commit
fb1f15774f
15 changed files with 121 additions and 171 deletions
27
Userland/Libraries/LibWeb/WebAssembly/Module.idl
Normal file
27
Userland/Libraries/LibWeb/WebAssembly/Module.idl
Normal file
|
@ -0,0 +1,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);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue