mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Export PaperScript.install, so it can be loaded after onload.
This commit is contained in:
parent
3685a614a5
commit
b4356078a7
1 changed files with 28 additions and 21 deletions
|
@ -163,9 +163,7 @@ var PaperScript = new function() {
|
|||
};
|
||||
return xhr.send(null);
|
||||
}
|
||||
|
||||
Events.add(window, {
|
||||
load: function() {
|
||||
function install() {
|
||||
var scripts = document.getElementsByTagName('script');
|
||||
for (var i = 0, l = scripts.length; i < l; i++) {
|
||||
var script = scripts[i];
|
||||
|
@ -185,12 +183,21 @@ var PaperScript = new function() {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
//#endif // BROWSER
|
||||
Events.add(window, { load: install });
|
||||
|
||||
return {
|
||||
compile: compile,
|
||||
run: run,
|
||||
install: install
|
||||
};
|
||||
|
||||
//#else // !BROWSER
|
||||
|
||||
return {
|
||||
compile: compile,
|
||||
run: run
|
||||
};
|
||||
|
||||
//#endif // !BROWSER
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue