#3 ✓resolved
Wes Biggs

Execute scripts appended to DOM by code

Reported by Wes Biggs | January 2nd, 2009 @ 02:59 PM | in 1.0 Release

In addition to executing scripts on document load, we need to execute scripts that are dynamically generated in the document.

I added the following in appendChild:

    appendChild: function(node){
        this._dom.appendChild( node._dom );
        // BEGIN PATCH
        if (node.tagName == 'SCRIPT') {
            if (node.getAttribute("src")) {
            setTimeout(function() { load(node.src); },0);
            } else {
        // END PATCH

This is a little too naive, though; we'd like the src attribute to load relative to window.location. This is more properly handled by the generic script executor (we may need to write some code to parse relative URLs).

Comments and changes to this ticket

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

People watching this ticket

Referenced by