You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Hudson (Commented) (JIRA)" <ji...@apache.org> on 2011/10/27 22:58:32 UTC
[jira] [Commented] (TAP5-1731) Dynamic loading of JavaScript
libraries is sometimes broken in IE (in rare cases)
[ https://issues.apache.org/jira/browse/TAP5-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137535#comment-13137535 ]
Hudson commented on TAP5-1731:
------------------------------
Integrated in tapestry-trunk-freestyle #613 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/613/])
TAP5-1731: Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)
hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1189944
Files :
* /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
> Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)
> ---------------------------------------------------------------------------------
>
> Key: TAP5-1731
> URL: https://issues.apache.org/jira/browse/TAP5-1731
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Howard M. Lewis Ship
> Assignee: Howard M. Lewis Ship
> Labels: ie, javascript
> Fix For: 5.3
>
>
> Problem is in this code:
> addScripts : function(scripts, callback) {
> var _ = T5._;
> var loaded = _(document.scripts).chain().pluck("src").without("").map(this.rebuildURLIfIE).value();
> var topCallback = _(scripts).chain().map(Tapestry.rebuildURL).difference(loaded).reverse().reduce(
> function (nextCallback, scriptURL) {
> return function() {
> this.loadScript(scriptURL, nextCallback);
> }
> }, callback).value();
> // Kick if off with the callback that loads the first script:
> topCallback.call(this);
> },
> In the nested callback, the "this" variable is not set to the right value, at least not inside ie. Need to fully qualify (Tapestry.ScriptLoader.loadScript()) or other bind this.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira