ladybird/Userland/Libraries/LibWeb/WebAssembly/WebAssembly.idl
2023-03-16 19:39:17 +00:00

18 lines
581 B
Plaintext

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