September 2018
Intermediate to advanced
328 pages
9h 10m
English
If you specify -o <target>.html when running the emcc command, Emscripten generates an HTML file and automatically adds code to load the module to the end of the file. Here's what the loading code in the HTML file looks like with the contents of each Module function excluded:
var statusElement = document.getElementById('status');var progressElement = document.getElementById('progress');var spinnerElement = document.getElementById('spinner');var Module = { preRun: [], postRun: [], print: (function() {...})(), printErr: function(text) {...}, canvas: (function() {...})(), setStatus: function(text) {...}, totalDependencies: 0, monitorRunDependencies: function(left) {...}};Module.setStatus('Downloading...');window.onerror ...Read now
Unlock full access