Closed Bug 158307 Opened 24 years ago Closed 24 years ago

innerHTML cannot be changed in a xul file

Categories

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

x86
Windows 2000
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 133827

People

(Reporter: antonio, Assigned: jst)

Details

From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) BuildID: 2002071813 Problem happens with a XUL file (but NOT in HTML files!) Reproducible: Always Steps to Reproduce: 1. put the code, that I show you at the end of this, in a file called bad_problem.xul 2. load in the browser the file bad_problem.xul 3. click the button 'Crash now!' the code to be put in bad_problem.xul is this: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="example-window" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function theTest() { document.getElementById('ProblematicElement').innerHTML="Hello World!"; } </script> <spacer style="height: 15px"/> <hbox> <button label="Crash now!" onclick="theTest()"/> </hbox> <spacer style="height: 15px"/> <vbox flex="1"> <html:div id="ProblematicElement"> Hello, World </html:div> </vbox> </window> Actual Results: Mozilla does not crash but this exception appear in JavaScript Console: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLElement.innerHTML]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" ...] Expected Results: That the HTML of the div changes!
Hardly a blocker... -> DOM HTML Not that I'm really sure what the symantics of .innerHTML in a non-html document should be...
Assignee: rogerl → jst
Severity: blocker → major
Component: JavaScript Engine → DOM HTML
QA Contact: pschwartau → stummala
*** This bug has been marked as a duplicate of 133827 ***
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
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.