[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ja/docs/WebAssembly/Reference/JavaScript_interface/validate_static [Back]  [Original]

WebAssembly.validate() - WebAssembly | MDN

MDN Web Docs

View in English Always switch to English

WebAssembly.validate()

Baseline *

201710

*

WebAssembly.validate() WebAssembly wasm (true) (false)

js
WebAssembly.validate(bufferSource);

bufferSource

WebAssembly ArrayBuffer

wasm (true) (false)

bufferSource ArrayBuffer TypeError

validate

(validate.html ) .wasm validate()

js
fetch("simple.wasm")
  .then((response) => response.arrayBuffer())
  .then(function (bytes) {
    var 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