mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
23 lines
966 B
Text
23 lines
966 B
Text
#import <WebAssembly/Instance.idl>
|
|
#import <WebAssembly/Module.idl>
|
|
#import <Fetch/Response.idl>
|
|
|
|
dictionary WebAssemblyInstantiatedSource {
|
|
required Module module;
|
|
required Instance instance;
|
|
};
|
|
|
|
// https://webassembly.github.io/spec/js-api/#webassembly-namespace
|
|
// https://webassembly.github.io/spec/web-api/index.html#streaming-modules
|
|
[Exposed=*, WithGCVisitor, WithFinalizer]
|
|
namespace WebAssembly {
|
|
// FIXME: Streaming APIs are supposed to be only exposed to Window, Worker
|
|
|
|
boolean validate(BufferSource bytes);
|
|
Promise<Module> compile(BufferSource bytes);
|
|
Promise<Module> compileStreaming(Promise<Response> source);
|
|
|
|
Promise<WebAssemblyInstantiatedSource> instantiate(BufferSource bytes, optional object importObject);
|
|
Promise<WebAssemblyInstantiatedSource> instantiateStreaming(Promise<Response> source, optional object importObject);
|
|
Promise<Instance> instantiate(Module moduleObject, optional object importObject);
|
|
};
|