} else if (elem.webkitRequestFullscreen) { /* Safari */
var canvas = document.getElementById('canvas');
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) { /* IE11 */
// As a default initial behavior, pop up an alert when webgl context is lost. To make your
elem.msRequestFullscreen();
// application robust, you may want to override this behavior before shipping!
}
// See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
}
canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
var Module = {
preRun: [],
return canvas;
postRun: [],
})(),
canvas: (function () {
};
const canvas = document.querySelector('canvas');
</script>
// As a default initial behavior, pop up an alert when webgl context is lost. To make your
// application robust, you may want to override this behavior before shipping!
// See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
canvas.addEventListener("webglcontextlost", function (e) {
alert('WebGL context lost. You will need to reload the page.');