You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (Closed) (JIRA)" <ji...@apache.org> on 2011/10/27 21:12:32 UTC

[jira] [Closed] (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:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1731.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.3
         Assignee: Howard M. Lewis Ship
    
> 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