Table

package js.lib.webassembly

Available on js

A Table object of the given size and element type.

This 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.

Documentation Table by Mozilla Contributors, licensed under CC-BY-SA 2.5.

Constructor

new(tableDescriptor:TableDescriptor)

Variables

length:Int

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

Methods

get(index:Int):Function

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

grow(number:Int):Int

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

set(index:Int, value:Function):Void

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

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/lib/webassembly/Table.html