Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /wasm/jsapi/table/constructor-types.tentative.any.js - WPT Dashboard Interop Dashboard
- /wasm/jsapi/table/constructor-types.tentative.any.html - WPT Dashboard Interop Dashboard
- /wasm/jsapi/table/constructor-types.tentative.any.shadowrealm.html - WPT Dashboard Interop Dashboard
- /wasm/jsapi/table/constructor-types.tentative.any.worker.html - WPT Dashboard Interop Dashboard
// META: global=window,dedicatedworker,jsshell,shadowrealm
// META: script=/wasm/jsapi/assertions.js
// META: script=/wasm/jsapi/table/assertions.js
test(() => {
const argument = { "element": "anyfunc", "initial": 0, "minimum": 0 };
assert_throws_js(TypeError, () => new WebAssembly.Table(argument));
}, "Initializing with both initial and minimum");
test(() => {
const argument = { "element": "anyfunc", "minimum": 0 };
const table = new WebAssembly.Table(argument);
assert_Table(table, { "length": 0 });
}, "Zero minimum");
test(() => {
const argument = { "element": "anyfunc", "minimum": 5 };
const table = new WebAssembly.Table(argument);
assert_Table(table, { "length": 5 });
}, "Non-zero minimum");