gecko-dev/dom/browser-element/mochitest/priority/file_WebGLContextLost.html

23 строки
482 B
HTML

<html>
<body>
file_WebGLContextLost.html
<canvas id='canvas'></canvas>
<script>
function runTest()
{
var canvas = document.getElementById('canvas');
canvas.addEventListener('webglcontextlost', function() {
alert('webglcontextlost');
});
var context = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
context.viewport(0, 0, 10, 10);
alert('ready');
}
addEventListener('load', function() { setTimeout(runTest, 0) });
</script>
</body>
</html>