mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
This implements the `canvas`, `drawingBufferHeight` and `drawingBufferWidth` getters to `WebGLRenderingContext`, and an initial version of `getParameter`.
14 lines
454 B
HTML
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>
|