ladybird/Libraries/LibWeb/WebAssembly/Table.idl

24 lines
642 B
Text
Raw Normal View History

2023-03-16 00:16:22 +00:00
enum TableKind {
"externref",
"anyfunc"
};
dictionary TableDescriptor {
required TableKind element;
required [EnforceRange] unsigned long initial;
[EnforceRange] unsigned long maximum;
};
// https://webassembly.github.io/spec/js-api/#tables
[LegacyNamespace=WebAssembly, Exposed=*]
interface Table {
constructor(TableDescriptor descriptor, optional any value);
unsigned long grow([EnforceRange] unsigned long delta, optional any value);
any get([EnforceRange] unsigned long index);
undefined set([EnforceRange] unsigned long index, optional any value);
readonly attribute unsigned long length;
};