WebAssembly.Table.prototype.grow()
 The grow() prototype method of the WebAssembly.Table object increases the size of the Table instance by a specified number of elements. 
Syntax
grow(number)
Parameters
 number  The number of elements you want to grow the table by.  Return value
The previous length of the table.Exceptions
 If the grow() operation fails for whatever reason, a RangeError is thrown. Examples
Using grow

 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

Specifications

Specification
WebAssembly JavaScript Interface: Exception Handling # dom-table-grow

Browser compatibility




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



grow
57
16
52
No
44
11
57
57
52
43
11
7.0
1.0
8.0.0


See also
 
WebAssembly overview page WebAssembly concepts Using the WebAssembly JavaScript API 

Found a problem with this page?

Edit on GitHub
Source on GitHub
Report a problem with this content on GitHub
Want to fix the problem yourself? See our Contribution guide.


Last modified: May 24, 2022, by MDN contributors


    
{'path': 'public/docs/javascript/global_objects/webassembly/table/grow.html', 'source': 'DevDocs.IO'}