Browse Source

Fixed stupidity.

dev-tmpl
Bryan Miller 6 years ago
parent
commit
7994c578be
2 changed files with 5 additions and 7 deletions
  1. +4
    -4
      app/js/main.js
  2. +1
    -3
      index.html

+ 4
- 4
app/js/main.js View File

@@ -2,16 +2,16 @@

function initialize(DOC){
console.log(DOC);
var canvas = DOC.getElementByID("painter");
var canvas = DOC.getElementById("painter");
if (!canvas){
throw new Exception("DOM Missing painter canvas.");
throw new Error("DOM Missing painter canvas.");
}
var ctx = canvas.getContext("2d");
if (!ctx){
throw new Exception("Failed to obtain canvas context.");
throw new Error("Failed to obtain canvas context.");
}
}


//console.log(document.getElementByID("painter"));
//initialize(document);
initialize(document);

+ 1
- 3
index.html View File

@@ -14,7 +14,5 @@
<canvas id="painte"></canvas>

</body>
<script src="app/js/main.js">
initialize(document);
</script>
<script src="app/js/main.js"></script>
</html>

Loading…
Cancel
Save