mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
10 lines
321 B
HTML
10 lines
321 B
HTML
|
<script>
|
||
|
async function loadTable() {
|
||
|
const tbl = new WebAssembly.Table({ initial: 2, element: 'anyfunc' });
|
||
|
const response = await fetch('table2.wasm');
|
||
|
const body = await response.arrayBuffer();
|
||
|
await WebAssembly.instantiate(body, { js: { tbl: tbl } });
|
||
|
return `${tbl.get(0)()}, ${tbl.get(1)()}`;
|
||
|
}
|
||
|
</script>
|