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:
parent
ca96f8e364
commit
2cfcbccdb5
17 changed files with 230 additions and 357 deletions
23
Userland/Libraries/LibWeb/WebAssembly/Table.idl
Normal file
23
Userland/Libraries/LibWeb/WebAssembly/Table.idl
Normal 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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue