Closed Bug 291047 Opened 20 years ago Closed 15 years ago

doing .innerHTML='' for empty content nodes generates extra node

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: martijn.martijn, Unassigned)

References

Details

(Keywords: testcase, Whiteboard: [fixed by the HTML5 parser])

Attachments

(1 file)

When setting .innerHTML on html elements that should be empty - eg img, input,
embed - you get inside the element not only the text, but also an extra element,
the element that's being set .innerHTML on.
See the upcoming testcase to see what I mean. Also check the result of the
testcase with the DOM Inspector.
With the testcase, I would not expect the extra <img> inside the <img>.
Attached file Testcase
This might be related to bug 228920, where a <col> becomes a container.
So is the problem in CreateContextualFragment, or in inserting it into the DOM?
Depends on: 328930
whether bug 396001 is related to this?
Not really, no.
Assignee: parser → nobody
QA Contact: mrbkap → parser
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by the HTML5 parser]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: