Closed
Bug 420930
Opened 16 years ago
Closed 16 years ago
In XML, document.createElement() creates incorrect element
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 296921
People
(Reporter: timwi, Unassigned)
Details
Attachments
(3 files, 1 obsolete file)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12 Build Identifier: See the attached testcase. The JavaScript in the testcase creates a <pre> element. However, it is rendered as if it was a <div>. Reproducible: Always Actual Results: <pre> element is rendered as if it was a <div>, even though "View selection source" actually shows the element as a <pre>. Expected Results: <pre> should be rendered as a <pre>. This problem occurs only if the document's MIME type is text/xml. If it is text/html, the code works as expected.
Whoops? Looks like the HTML parser doesn't like CDATA ... but anyway, this one works, this is what it should look like.
Attachment #307289 -
Attachment is obsolete: true
Comment 5•16 years ago
|
||
Use createElementNS and/or application/xhtml+xml.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•