4 <title>Synchronized screenshot test
</title>
6 html, body { margin:
0; }
10 <canvas id=
"canvas" width=
"256" height=
"256"></canvas>
14 var canvas
= document
.getElementById("canvas");
15 var ctx
= canvas
.getContext("2d");
16 var text
= document
.getElementById("text");
17 function draw(r
, g
, b
) {
18 var rgb
= "RGB(" + r
+ "," + g
+ "," + b
+ ")";
19 text
.textContent
= rgb
;
21 ctx
.fillRect(0, 0, canvas
.width
, canvas
.height
);