servo/tests/html/test_webgl_context_getters.html
ecoal95 eff2bb4310 WebGLRenderingContext getters and getParameter
This implements the `canvas`, `drawingBufferHeight` and
`drawingBufferWidth` getters to `WebGLRenderingContext`, and an initial
version of `getParameter`.
2015-06-01 16:34:51 +02:00

14 lines
454 B
HTML

<!doctype html>
<meta charset="utf-8">
<title>WebGLRenderingContext attributes test</title>
<script>
var canvas = document.createElement('canvas'),
gl = canvas.getContext('webgl');
if ( gl.canvas !== canvas )
console.error("Expected a canvas getter");
if ( typeof gl.drawingBufferWidth !== "number" ||
typeof gl.drawingBufferHeight !== "number" )
console.error("drawingBuffer{Height/Width} should be numbers");
</script>