Closed Bug 88318 Opened 23 years ago Closed 23 years ago

script evaluation only happens when a SCRIPT element is first attached to a document tree

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 26790

People

(Reporter: bc, Assigned: vidur)

Details

Attachments

(4 files, 1 obsolete file)

The specific problem is that script evaluation only happens when a SCRIPT
element is first attached to a document tree. Setting the SRC attribute
dynamically doesn't trigger loading and evaluation. 

How to reproduce:

Create a Script Element dynamically and attach it to the HTML Document via
appendChild, then set SRC attribute to point to a script file.

Expected Behavior:  Script Loads and Runs.
Actual Behavior:    Script Does Not Load.
Reproducible:       Always.

Note that setting the SRC attribute before attaching the script element to the
document will load and run the script.
Attached file zip file containing test case (deleted) —
Dup of bug 26790 "setting 'src' property on SCRIPT element has no effect"

*** This bug has been marked as a duplicate of 26790 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
verified dup of bug 26790
Status: RESOLVED → VERIFIED
Attachment #40557 - Attachment mime type: application/octet-stream → application/x-zip-compressed
Attached file testcase js file (deleted) —
Attached file testcase showing the problem (deleted) —
Attachment #63050 - Attachment is obsolete: true
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: