JS editor for school chromebooks
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
341 B

  1. window.onload = function() {
  2. document.write("<canvas id='canvas' style='width: 100%; height: 100%;'></canvas>");
  3. var canvas = document.getElementById("canvas");
  4. var c = canvas.getContext("2d");
  5. setInterval(function() {
  6. canvas.width = window.innerWidth;
  7. canvas.height = window.innerHeight;
  8. c.fillRect(10, 10, 10, 10);
  9. }, 1);
  10. }