September 2018
Intermediate to advanced
328 pages
9h 10m
English
Next, create a file named js-without-glue.html in your /chapter-06-interact-with-js folder and populate it with the following contents:
<!doctype html><html lang="en-us"><head> <title>Interact with JS without Glue Code</title> <script type="application/javascript" src="../common/load-wasm.js"> </script> <style> #myCanvas { border: 2px solid black; } #actionButtonWrapper { margin-top: 16px; } #actionButton { width: 100px; height: 24px; } </style></head><body> <h1>Interact with JS without Glue Code</h1> <canvas id="myCanvas" width="255" height="255"></canvas> <div id="actionButtonWrapper"> <button id="actionButton">Pause</button> </div> <script type="application/javascript"> const canvas = document.querySelector('#myCanvas'); ...Read now
Unlock full access