Closed Maksims closed 3 years ago
If canvas width == 0 and height == 0 it will fails to create context. It require bigger resolution, with 320x240 works.
html:
<canvas id='render' width='0' height='0'></canvas>
js:
var canvas = document.getElementById('render'); try { var gl = canvas.getContext('experimental-webgl'); } catch(e) { console.log(e); // Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" }
If canvas width == 0 and height == 0 it will fails to create context. It require bigger resolution, with 320x240 works.
html:
js: