1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:37:35 +00:00

LibWeb: Port WebAssembly.Table to IDL

This commit is contained in:
Timothy Flynn 2023-03-15 20:16:22 -04:00 committed by Andreas Kling
parent ca96f8e364
commit 2cfcbccdb5
17 changed files with 230 additions and 357 deletions

View file

@ -0,0 +1,23 @@
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;
};