mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:57:35 +00:00
LibWeb: Port the WebAssembly namespace to IDL
This commit is contained in:
parent
2cd7159694
commit
57646c86ef
8 changed files with 186 additions and 170 deletions
17
Userland/Libraries/LibWeb/WebAssembly/WebAssembly.idl
Normal file
17
Userland/Libraries/LibWeb/WebAssembly/WebAssembly.idl
Normal file
|
@ -0,0 +1,17 @@
|
|||
#import <WebAssembly/Instance.idl>
|
||||
#import <WebAssembly/Module.idl>
|
||||
|
||||
dictionary WebAssemblyInstantiatedSource {
|
||||
required Module module;
|
||||
required Instance instance;
|
||||
};
|
||||
|
||||
// https://webassembly.github.io/spec/js-api/#webassembly-namespace
|
||||
[Exposed=*, WithGCVistor]
|
||||
namespace WebAssembly {
|
||||
boolean validate(BufferSource bytes);
|
||||
Promise<Module> compile(BufferSource bytes);
|
||||
|
||||
Promise<WebAssemblyInstantiatedSource> instantiate(BufferSource bytes, optional object importObject);
|
||||
Promise<Instance> instantiate(Module moduleObject, optional object importObject);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue