Table.idl 642 B

1234567891011121314151617181920212223
  1. enum TableKind {
  2. "externref",
  3. "anyfunc"
  4. };
  5. dictionary TableDescriptor {
  6. required TableKind element;
  7. required [EnforceRange] unsigned long initial;
  8. [EnforceRange] unsigned long maximum;
  9. };
  10. // https://webassembly.github.io/spec/js-api/#tables
  11. [LegacyNamespace=WebAssembly, Exposed=*]
  12. interface Table {
  13. constructor(TableDescriptor descriptor, optional any value);
  14. unsigned long grow([EnforceRange] unsigned long delta, optional any value);
  15. any get([EnforceRange] unsigned long index);
  16. undefined set([EnforceRange] unsigned long index, optional any value);
  17. readonly attribute unsigned long length;
  18. };