Author: hlship
Date: Thu Oct 27 19:13:21 2011
New Revision: 1189944
URL: http://svn.apache.org/viewvc?rev=1189944&view=rev
Log:
TAP5-1731: Dynamic loading of JavaScript libraries is sometimes broken in IE
(in rare cases)
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js?rev=1189944&r1=1189943&r2=1189944&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
Thu Oct 27 19:13:21 2011
@@ -2020,10 +2020,12 @@ Tapestry.ScriptManager = {
var loaded =
_(document.scripts).chain().pluck("src").without("").map(this.rebuildURLIfIE).value();
+ var self = this;
+
var topCallback =
_(scripts).chain().map(Tapestry.rebuildURL).difference(loaded).reverse().reduce(
function (nextCallback, scriptURL) {
return function() {
- this.loadScript(scriptURL, nextCallback);
+ self.loadScript(scriptURL, nextCallback);
}
}, callback).value();