[Pkg-javascript-commits] [dojo] 06/09: Refs #6358: xdomain loader did not handle module paths starting with /. Matching loader.js behavior and removing some cruft. \!strict for redeclarations.
David Prévot
taffit at moszumanska.debian.org
Mon May 11 20:11:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.1.1
in repository dojo.
commit f43abd20a6bd9ced9238652bca1924e1a6903c30
Author: James Burke <jrburke at gmail.com>
Date: Fri May 2 22:02:22 2008 +0000
Refs #6358: xdomain loader did not handle module paths starting with /. Matching loader.js behavior and removing some cruft. \!strict for redeclarations.
git-svn-id: http://svn.dojotoolkit.org/src/branches/1.1/dojo@13550 560b804f-0ae3-0310-86f3-f6aa0a117693
---
_base/_loader/loader_xd.js | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/_base/_loader/loader_xd.js b/_base/_loader/loader_xd.js
index cacb728..f50cba8 100644
--- a/_base/_loader/loader_xd.js
+++ b/_base/_loader/loader_xd.js
@@ -111,16 +111,7 @@ dojo._loadPath = function(/*String*/relpath, /*String?*/module, /*Function?*/cb)
var currentIsXDomain = this._xdIsXDomainPath(relpath);
this._isXDomain |= currentIsXDomain;
- var uri = this.baseUrl + relpath;
- if(currentIsXDomain){
- // check whether the relpath is an absolute URL itself. If so, we
- // ignore baseUrl
- var colonIndex = relpath.indexOf(":");
- var slashIndex = relpath.indexOf("/");
- if(colonIndex > 0 && colonIndex < slashIndex){
- uri = relpath;
- }
- }
+ var uri = ((relpath.charAt(0) == '/' || relpath.match(/^\w+:/)) ? "" : this.baseUrl) + relpath;
try{
return ((!module || this._isXDomain) ? this._loadUri(uri, cb, currentIsXDomain, module) : this._loadUriAndCheck(uri, module, cb)); //Boolean
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git
More information about the Pkg-javascript-commits
mailing list