Bug 6640 - onload() event handler never called for created script element
Summary: onload() event handler never called for created script element
Status: RESOLVED DUPLICATE of bug 5812
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 8204 (view as bug list)
Depends on:
Blocks: 10489
  Show dependency treegraph
 
Reported: 2006-01-17 20:58 PST by Jesse Costello-Good
Modified: 2006-08-18 16:47 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Costello-Good 2006-01-17 20:58:33 PST
When loading a script file dynamically using the following common DOM technique, the onload() event 
handler is never called. 

var element = document.createElement("script");
element.src = "/path/to/my/file.js";
element.type = 'text/javascript';
element.language = 'javascript';
element.onload = function() { window.alert(this.src + " loaded"); };
document.getElementsByTagName("head")[0].appendChild(element);
Comment 1 Jesse Costello-Good 2006-01-17 20:58:56 PST
I am evaluating Safari for a port of TIBCO(R) General Interface, a mature AJAX platform that is currently IE 
only. Fixing this bug would make the port more feasible.
Comment 2 Jesse Costello-Good 2006-01-17 21:00:05 PST
I see that this bug is fixed in the most recent nightly build. 
Comment 3 Mark Rowe (bdash) 2006-01-17 22:02:13 PST

*** This bug has been marked as a duplicate of 5812 ***
Comment 4 Parag Shah 2006-04-05 19:30:00 PDT
*** Bug 8204 has been marked as a duplicate of this bug. ***