Always execute PaperScripts on load, not on domready, as we want assets to be present as well.

This commit is contained in:
Jürg Lehni 2011-03-03 18:53:06 +00:00
parent 0b3c57ff88
commit 3324b083b7

View file

@ -1,5 +1,7 @@
var PaperScript = new function() { var PaperScript = new function() {
function compile(code) { function compile(code) {
// TODO: Parse code and replace math operators with calls to methods
// that handle overloading.
return code; return code;
} }
@ -43,7 +45,7 @@ var PaperScript = new function() {
} }
if (window.addEventListener) { if (window.addEventListener) {
addEventListener('DOMContentLoaded', runScripts, false); addEventListener('load', runScripts, false);
} else { } else {
attachEvent('onload', runScripts); attachEvent('onload', runScripts);
} }