From 8f785131743f59d53bfac39e6d9858edcd881c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 8 Mar 2011 00:17:19 +0000 Subject: [PATCH] Change naming of exported PaperScript methods. --- src/util/PaperScript.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/util/PaperScript.js b/src/util/PaperScript.js index 1471655d..71e40147 100644 --- a/src/util/PaperScript.js +++ b/src/util/PaperScript.js @@ -149,7 +149,7 @@ var PaperScript = new function() { //#ifdef BROWSER // Code borrowed from Coffee Script: - function load(url) { + function request(url) { var xhr = new (window.ActiveXObject || XMLHttpRequest)('Microsoft.XMLHTTP'); xhr.open('GET', url, true); @@ -163,7 +163,8 @@ var PaperScript = new function() { }; return xhr.send(null); } - function install() { + + function load() { var scripts = document.getElementsByTagName('script'); for (var i = 0, l = scripts.length; i < l; i++) { var script = scripts[i]; @@ -175,7 +176,7 @@ var PaperScript = new function() { new Document(canvas); } if (script.src) { - load(script.src); + request(script.src); } else { run(script.innerHTML); } @@ -184,12 +185,12 @@ var PaperScript = new function() { return null; } - Events.add(window, { load: install }); + Events.add(window, { load: load }); return { compile: compile, run: run, - install: install + load: load }; //#else // !BROWSER