1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:27:43 +00:00

LibWeb: Port the WebAssembly namespace to IDL

This commit is contained in:
Timothy Flynn 2023-03-16 12:59:32 -04:00 committed by Linus Groh
parent 2cd7159694
commit 57646c86ef
8 changed files with 186 additions and 170 deletions

View 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);
};