我只是在玩HTML,但是在加载代码时出现错误。错误代码:内存不足

the code is short and it cant be because of outdated systems as this laptop was bought 4 months ago. Every time I click on the index.html file it takes 50 seconds to load and then I get the error. I am not sure what else to do as the Microsoft Help Team was useless. I am not sure if there are any errors in the code as I can't run it. Any help is appreciated. this is the error I get

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <title>A canvas</title>
  </head>
  <style type="text/css">
      canvas {
        border: 1px solid black;
      }
  </style>
  <body>
    <canvas id="canvas" height="1000px" width="1000px"></canvas>
    <script>

        var canvas = document.getElementById('canvas');
        var c = canvas.getContext('2d');
        canvas.addEventListener('mousedown', onDown, false);

        var fireWall = false;
        var score = 0;

        while (score != 10){
          c.font = "30px Comic Sans MS"
          c.fillText(score, 500, 200)
          c.font = "30px Comic Sans MS"
          c.fillText("Click the Screen 10 Times to Win the Hardest Game Ever!!!", 50,300);

          function onDown(){
            console.log('working')
            c.score++;
            }

          if(score === 10){
              fireWall = true;
              break;
          }
        }

        if(fireWall === true){
            c.fill(255, 153, 0);
            c.noStroke();
            c.ellipse(mouseX-90, mouseY-30, 75, 25);
            c.ellipse(mouseX-90, mouseY-80, 85, 35);
            c.rect(mouseX-103, mouseY-80, 25,45);
            c.rect(mouseX-132, mouseY-155, 85,75);
            c.textSize(50);
            c.fill(255,0,0);
            c.text("YOU WON", mouseX-205, mouseY-170);
        }

    </script>
  </body>
</html>

com / jywPv.png