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.
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.
The following example creates a new WebAssembly Table instance with an initial size of 2 and a maximum size of 10:
const table = new WebAssembly.Table({ element: "anyfunc", initial: 2, maximum: 10, });
Grow the table by 1 using WebAssembly.grow()
:
console.log(table.length); // 2 table.grow(1); console.log(table.length); // 3
Desktop | Mobile | Server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | Deno | Node.js | |
length |
57 |
16 |
52 |
No |
44 |
11 |
57 |
57 |
52 |
43 |
11 |
7.0 |
1.0 |
8.0.0 |
© 2005–2022 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table/length