| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script> | |
| 4 function testOne(operation) | |
| 5 { | |
| 6 var context = document.getElementById(operation).getContext('2d'); | |
| 7 | |
| 8 context.fillStyle = "green"; | |
| 9 context.fillRect(0, 0, 1000, 1000); | |
| 10 } | |
| 11 function test() | |
| 12 { | |
| 13 testOne("fill"); | |
| 14 testOne("stroke"); | |
| 15 testOne("clip"); | |
| 16 } | |
| 17 </script> | |
| 18 </head> | |
| 19 <body onload="test()"> | |
| 20 <p>All three of these small canvases should be green, not red.</p> | |
| 21 <canvas id="fill" width="20" height="20"></canvas> | |
| 22 <canvas id="stroke" width="20" height="20"></canvas> | |
| 23 <canvas id="clip" width="20" height="20"></canvas> | |
| 24 </body> | |
| 25 </html> | |
| OLD | NEW |