Bug 6640
Summary: | onload() event handler never called for created script element | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jesse Costello-Good <jesse> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | pshah |
Priority: | P2 | ||
Version: | 420+ | ||
Hardware: | Mac | ||
OS: | OS X 10.4 | ||
Bug Depends on: | |||
Bug Blocks: | 10489 |
Jesse Costello-Good
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);
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Jesse Costello-Good
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.
Jesse Costello-Good
I see that this bug is fixed in the most recent nightly build.
Mark Rowe (bdash)
*** This bug has been marked as a duplicate of 5812 ***
Parag Shah
*** Bug 8204 has been marked as a duplicate of this bug. ***