#82 ✓resolved

Execution of scripts added after page load

Reported by Adrees | December 15th, 2009 @ 11:37 AM | in 1.2.x

A script tag is added to the head of a document after the page has loaded but the script does not appear to be executing.

More details here:


I'll have to double check tomorrow that I'm using 1.1.rcl and not 1.0.x but I'm running env-js.jar

Comments and changes to this ticket

  • Thatcher

    Thatcher February 3rd, 2010 @ 04:43 PM

    • State changed from “new” to “open”
    • Milestone set to 1.2.x

    This is highest priority fix. 1.2 will not be release until we get this fixed. Look for the test in src/html/document.js when the ticket is closed. Basically we plan to resolve it along with a stateful switch which is triggered by mutation events. There are many cases we hope to codify in the specs. Ideally we can use minimal events. Our choices are:

    case "DOMSubtreeModified":
    case "DOMNodeInserted":
    case "DOMNodeRemoved":
    case "DOMNodeRemovedFromDocument":
    case "DOMNodeInsertedIntoDocument":

    I personally believe we can handle all cases with

    case "DOMNodeRemovedFromDocument":
    case "DOMNodeInsertedIntoDocument":

    and that will be minimal work. The reason is that reasources arent re-loaded(re-executed) unless the node is removed from the document entirely. Plus script nodes after document load arent executed (I think) unless the are appended as children of the head element.

    There are additional cases that complicate the issue because the script elements (again I think) shouldnt be executed if they are added via set innerHTML since that is essentially a parser operation/ I believe we can solve this by inspecting a state of the ducument during initial parse vrs later parse.

    Thanks for you patience, this shouldn't have gone unnoticed. Hopefully a series of isolated, clear, simple tests will prevent this from breaking in the future.


  • Thatcher

    Thatcher March 4th, 2010 @ 12:38 AM

    this is fixed an unit tested in

  • Thatcher

    Thatcher March 4th, 2010 @ 10:58 AM

    • State changed from “open” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

a javascript browser environment