| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/WebAssembly/Reference/JavaScript_interface/Table | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. Its been available across browsers since 2017 10.
WebAssembly.Table() Table .
, WebAssembly . JavaScript WebAssembly JavaScript WebAssembly .
: function references .
var myTable = new WebAssembly.Table(tableDescriptor);
:_ element
_ : . "anyfunc"() .
WebAssembly .
WebAssembly .
tableDescriptor object TypeError .maximum initial RangeError .Table instances Table Table() prototype object . Table .
Table.prototype.get()- .
Table.prototype.grow()Table .
Table.prototype.set(), .
(table2.html source code live version ) 2 WebAssembly Table . ( Table.prototype.get() . 2 null .
var tbl = new WebAssembly.Table({ initial: 2, element: "anyfunc" });
console.log(tbl.length); // "2"
console.log(tbl.get(0)); // "null"
console.log(tbl.get(1)); // "null"
importObj .
var importObj = {
js: {
tbl: tbl,
},
};
WebAssembly.instantiateStreaming () wasm (table2.wasm) . table2.wasm ( 42 83 ) 0 1 (text representation ). 2 JS Exported WebAssembly Functions .
WebAssembly.instantiateStreaming(fetch("table2.wasm"), importObject).then(
function (obj) {
console.log(tbl.length);
console.log(tbl.get(0)());
console.log(tbl.get(1)());
},
);
( : get(0) get(0)()).
wasm .
| Specification |
|---|
| WebAssembly JavaScript Interface # tables |
This page was last modified on 2026 7 15 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |