mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-28 21:51:51 -10:00
This implements the `canvas`, `drawingBufferHeight` and `drawingBufferWidth` getters to `WebGLRenderingContext`, and an initial version of `getParameter`. r? @jdm or @nox? Source-Repo: https://github.com/servo/servo Source-Revision: 042737793b1995ad93dc093ea12ec986b99e64b8
15 lines
454 B
HTML
15 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>
|