mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -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() {
|
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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue