Table

open class Table(descriptor: TableDescriptor, value: JsAny? = definedExternally)(source)

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

MDN Reference

Constructors

Link copied to clipboard
constructor(descriptor: TableDescriptor, value: JsAny? = definedExternally)

Properties

Link copied to clipboard
open external val length: AddressValue

The read-only length prototype property of the WebAssembly.Table object returns the length of the table, i.e., the number of elements in the table.

Functions

Link copied to clipboard
open external fun get(index: AddressValue): JsAny?

The get() prototype method of the WebAssembly.Table() object retrieves the element stored at a given index.

Link copied to clipboard
open external fun grow(delta: AddressValue, value: JsAny? = definedExternally): AddressValue

The grow() prototype method of the WebAssembly.Table object increases the size of the Table instance by a specified number of elements, filled with the provided value.

Link copied to clipboard
open external fun set(index: AddressValue, value: JsAny? = definedExternally)

The set() prototype method of the WebAssembly.Table object mutates a reference stored at a given index to a different value.