const table = new WebAssembly.Table({
element: "anyfunc",
initial: 2,
maximum: 10,
});WebAssembly.Table.prototype.grow() / notebook
WebAssembly.Table.prototype.grow()
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
console.log(table.length); // 2
table.grow(1);
console.log(table.length); // 3const myObject = { hello: "world" };
const table = new WebAssembly.Table({
element: "externref",
initial: 0,
maximum: 4,
});table.grow(4, myObject);
console.log(myObject === table.get(2)); // true