pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://developer.mozilla.org/ko/docs/WebAssembly/Reference/JavaScript_interface/validate_static

4bdf-a490-390a1aebf6dd/airgap.js" >

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

WebAssembly.validate()

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2017년 10월.

* Some parts of this feature may have varying levels of support.

WebAssembly.validate() 함수는 바이트가 유효한 wasm 모듈을 형성하는지 (true) 또는 생성하지 않는지 (false)를 반환하여 WebAssembly 바이너리 코드의 지정된 typed array의 유효성을 검사합니다.

Syntax

WebAssembly.validate(bufferSource);

Parameters

bufferSource

유효성을 검사 할 WebAssembly 바이너리 코드가 들어있는 typed array 또는 ArrayBuffer입니다.

Return value

bufferSource가 유효한 wasm 코드 (true)인지 아닌지 (false)를 지정하는 부울입니다.

Exceptions

bufferSourcetyped array이나 ArrayBuffer가 아닌 경우 TypeError가 발생합니다.

Examples

다음 예제 (validate.html source code 참조 및 see it live)는 .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",
    );
  });

명세서

Specification
WebAssembly JavaScript Interface
# dom-webassembly-validate

브라우저 호환성

See also

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy