Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1155

JavaScript initialization inside the partial page render Ajax response should be unquoted

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.2.0
    • 5.2.0
    • tapestry-core
    • None

    Description

      Currently, all the JS in an Ajax partial page render update comes inside the "script" key, as a long string. This is inefficient, since so many characters and quotes need to be escaped, and it is also harder to read and debug (especially since pretty printing is turned off, since pretty printing inside a string is no more readable that not).

      Instead, the calls to Tapestry.init() can be handled differently in an Ajax response, and encoded in a new key, "inits", an array of Tapestry.init() parameters (multiple calls to init because of the scheduling: early, normal, late).

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: