Open
Bug 304786
Opened 19 years ago
Updated 2 years ago
dynamically inserting/adding xul:script via DOM doesn't work
Categories
(Core :: DOM: Core & HTML, defect, P5)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: js177634, Unassigned)
References
()
Details
Attachments
(1 file)
516 bytes,
application/vnd.mozilla.xul+xml
|
Details |
User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.10) Gecko/20050730 Firefox/1.0.6 (Debian package 1.0.6-2)
Build Identifier: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.10) Gecko/20050730 Firefox/1.0.6 (Debian package 1.0.6-2)
When adding a <script> node to a document dynamically (from within JavaScript),
the behaviour between HTML and XUL differs. In HTML, the contained JavaScript
code is executed. In XUL, it is not.
In order to write dynamic XUL applications, it would be helpful to have the
added JavaScript nodes executed as well.
The two testcase files demonstrate the behaviour: With HTML, a message box pops
up, while with XUL, the node gets added (as can be confirmed with DOM
Inspector), but no message box appears.
Reproducible: Always
Comment 1•19 years ago
|
||
confirm with a 2005-08-15 deerpark build on winxp, over to dom
Assignee: nobody → general
Status: UNCONFIRMED → NEW
Component: General → DOM: Core
Ever confirmed: true
OS: Linux → All
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
Comment 2•19 years ago
|
||
The basic problem is that xul:script is not implemented in the content node (because nothing in XUL is!) but in the XUL parser...
Comment 3•19 years ago
|
||
A workaround until this is fixed:
change
document.createElement('script')
to
document.createElementNS('http://www.w3.org/1999/xhtml', 'script')
This should work fine even in XUL documents.
Updated•18 years ago
|
Summary: Adding JavaScript dom nodes in XUL doesn't work → Adding xul:script dynamically via DOM doesn't work
Updated•17 years ago
|
Summary: Adding xul:script dynamically via DOM doesn't work → dynamically inserting/adding xul:script via DOM doesn't work
Updated•11 years ago
|
Assignee: general → nobody
Comment 5•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•