4 function testOne(operation
)
6 var context
= document
.getElementById(operation
).getContext('2d');
8 context
.fillStyle
= "red";
9 context
.fillRect(0, 0, 1000, 1000);
12 context
.lineTo(0, 1000);
13 context
.lineTo(1000, 1000);
14 context
.lineTo(1000, 0);
18 context
.fillStyle
= "green";
29 <body onload=
"test()">
30 <p>All three of these small canvases should be green, not red.
</p>
31 <canvas id=
"fill" width=
"20" height=
"20"></canvas>
32 <canvas id=
"stroke" width=
"20" height=
"20"></canvas>
33 <canvas id=
"clip" width=
"20" height=
"20"></canvas>