| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/zh-CN/docs/WebAssembly/Reference/JavaScript_interface/validate_static | [Back] [Original] |
Get to know MDN better
WebAssembly.validate(bufferSource)
WebAssembly.validate(bufferSource, compileOptions)
bufferSourceWebAssembly typed array ArrayBuffer
bufferSource wasm truefalse
bufferSource typed array ArrayBuffer TypeError
validate.html fetch .wasm validate()
fetch("simple.wasm")
.then((response) => response.arrayBuffer())
.then((bytes) => {
const valid = WebAssembly.validate(bytes);
console.log(
`The given bytes are ${valid ? "" : "not "}a valid Wasm module`,
);
});
| WebAssembly JavaScript Interface # dom-webassembly-validate |
| Web Proxy Viewer | New URL | Original Page |