Tapestry 5
  1. Tapestry 5
  2. TAP5-1137

Dynamically adding JavaScript libraries to a page via a partial page update does not seem to work consistently in Safari and Chrome

    Details

      Description

      When scripts have dependencies on each other, it appears they can be loaded and executed out-of-order, causing runtime exceptions in the browser.

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        Ideally, dependencies wouldn't be resolved until a DOM Loaded event handler, but that's not always the case (tapx-datefield uses a library that breaks this rule).

        The approach I'm working with is to load each added script sequentially, rather than creating a batch of new <script> elements and waiting for them all to complete (in indeterminate order).

        Show
        Howard M. Lewis Ship added a comment - Ideally, dependencies wouldn't be resolved until a DOM Loaded event handler, but that's not always the case (tapx-datefield uses a library that breaks this rule). The approach I'm working with is to load each added script sequentially, rather than creating a batch of new <script> elements and waiting for them all to complete (in indeterminate order).
        Hide
        Howard M. Lewis Ship added a comment -

        May be related to loading multiple JS files with dependencies between them. It looks like the JS files are being executed in the order their content arrives, rather than in the order in which the JS files are specified.

        Show
        Howard M. Lewis Ship added a comment - May be related to loading multiple JS files with dependencies between them. It looks like the JS files are being executed in the order their content arrives, rather than in the order in which the JS files are specified.
        Hide
        Howard M. Lewis Ship added a comment -

        Having trouble duplicating this under test conditions. Need to see what's going on in my client application that's making this break. It may be related to more complicated JS libraries that, themselves, load additional JS files.

        Show
        Howard M. Lewis Ship added a comment - Having trouble duplicating this under test conditions. Need to see what's going on in my client application that's making this break. It may be related to more complicated JS libraries that, themselves, load additional JS files.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development