mmaxfield@apple.com | 2855fa5 | 2019-06-06 02:17:15 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | </head> |
| 5 | <body> |
| 6 | <canvas id="canvas" width="400" height="400"></canvas> |
| 7 | <script> |
| 8 | async function start() { |
| 9 | const canvas = document.getElementById("canvas"); |
| 10 | const context = canvas.getContext("2d"); |
| 11 | context.fillStyle = "blue"; |
| 12 | context.fillRect(0, 0, 400, 400); |
| 13 | context.fillStyle = "white"; |
| 14 | context.fillRect(100, 100, 200, 200); |
| 15 | } |
| 16 | window.addEventListener("load", start); |
| 17 | </script> |
| 18 | </body> |
| 19 | </html> |