Skip to main content

Table

class WebAssembly.Table

The WebAssembly.Table() object is a JavaScript wrapper object — an array-like structure representing a WebAssembly Table, which stores function references. A table created by JavaScript or in WebAssembly code will be accessible and mutable from both JavaScript and WebAssembly.

MDN

Constructors Jump to heading

new
Jump to headingTable(descriptor: TableDescriptor)

Creates a new Table object.

Properties Jump to heading

readonly
Jump to headinglength: number

Returns the length of the table, i.e. the number of elements.

Jump to headingget(index: number): Function | null

Accessor function — gets the element stored at a given index.

Jump to headinggrow(delta: number): number

Increases the size of the Table instance by a specified number of elements.

Jump to headingset(
index: number,
value: Function | null,
): void

Sets an element stored at a given index to a given value.

Back to top