W3cubDocs

/JavaScript

WebAssembly.table.prototype

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The WebAssembly.Table.prototype property represents the prototype for the WebAssembly.Table() constructor.

Property attributes of WebAssembly.Table.prototype
Writable no
Enumerable no
Configurable no

Description

All WebAssembly.Table instances inherit from Table.prototype. The prototype object of the WebAssembly.Table() constructor can be modified to affect all WebAssembly.Table instances.

Properties

Table.prototype.constructor
Returns the function that created this object's instance. By default this is the WebAssembly.Table() constructor.
Table.prototype.length
Returns the length of the table, i.e. the number of references stored in the table.

Methods

Table.prototype.get()
Accessor function — gets a reference stored at a given index.
Table.prototype.grow()
Increases the size of the Table instance by a specified number of references.
Table.prototype.set()
Mutates a reference stored at a given index to a different value.

Specifications

Specification Status Comment
WebAssembly JavaScript Interface
The definition of 'Table' in that specification.
Working Draft Initial draft definition.

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support 57 16 52
52
Disabled in the Firefox 52 Extended Support Release (ESR).
No 44 11
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support 57 57 Yes
Disabled
Yes
Disabled
Disabled This feature is behind the Experimental JavaScript Features preference.
52
52
Disabled in the Firefox 52 Extended Support Release (ESR).
? 11 7.0
Server
Node.js
Basic support 8.0.0

See also

© 2005–2018 Mozilla Developer Network and individual 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/prototype