The JavaScript and Web APIs

In addition to the WebAssembly Core Specification, there are two API specifications for interacting with WebAssembly modules: the WebAssembly JavaScript Interface (JavaScript API) and the WebAssembly Web API. In the previous sections, we covered pertinent aspects of the Core Specification to become familiar with the underlying technology. If you never read the Core Specification (or if you skipped the first few sections of this chapter), it wouldn't inhibit the use of WebAssembly in your application. That is not the case for the APIs, as they describe the methods and interface required to instantiate and interact with your compiled Wasm module. In this section, we will review the Web and JavaScript APIs and describe how to load and communicate with a Wasm module using JavaScript.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset