mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Always execute PaperScripts on load, not on domready, as we want assets to be present as well.
This commit is contained in:
parent
0b3c57ff88
commit
3324b083b7
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
var PaperScript = new function() {
|
||||
function compile(code) {
|
||||
// TODO: Parse code and replace math operators with calls to methods
|
||||
// that handle overloading.
|
||||
return code;
|
||||
}
|
||||
|
||||
|
@ -43,7 +45,7 @@ var PaperScript = new function() {
|
|||
}
|
||||
|
||||
if (window.addEventListener) {
|
||||
addEventListener('DOMContentLoaded', runScripts, false);
|
||||
addEventListener('load', runScripts, false);
|
||||
} else {
|
||||
attachEvent('onload', runScripts);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue