瀏覽代碼

Fixed stupidity.

dev-tmpl
Bryan Miller 6 年之前
父節點
當前提交
7994c578be
共有 2 個文件被更改,包括 5 次插入7 次删除
  1. +4
    -4
      app/js/main.js
  2. +1
    -3
      index.html

+ 4
- 4
app/js/main.js 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存