Tapestry 5
  1. Tapestry 5
  2. TAP5-1731

Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.3
    • Fix Version/s: 5.3
    • Component/s: tapestry-core
    • Labels:

      Description

      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.

        Activity

        Hide
        Hudson added a comment -

        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
        Show
        Hudson added a comment - 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
        Hide
        Howard M. Lewis Ship added a comment -

        Is suspect this is caused by my client's use of ExtJS, since it doesn't reproduce on a "vanilla" Tapestry stack.

        Show
        Howard M. Lewis Ship added a comment - Is suspect this is caused by my client's use of ExtJS, since it doesn't reproduce on a "vanilla" Tapestry stack.
        Hide
        Howard M. Lewis Ship added a comment -

        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.

        Show
        Howard M. Lewis Ship added a comment - 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.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development