[
https://issues.apache.org/jira/browse/TAP5-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137378#comment-13137378
]
Howard M. Lewis Ship commented on TAP5-1731:
--------------------------------------------
Odd, this reproduced easily for my client's project, but I'm having trouble
getting it to do so for the Tapestry integration test suite.
> Dynamic loading of JavaScript libraries is broken in IE
> -------------------------------------------------------
>
> 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
> Priority: Critical
> Labels: ie, javascript
>
> 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