Closed Bug 408528 Opened 17 years ago Closed 17 years ago

textContent kills elements

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 162653

People

(Reporter: surkov, Unassigned)

Details

Attachments

(1 file)

Attached file testcase
<div id="div"/>
<ul id="ul"/>

If I set div.textContent = "text" then it removes from DOM following up ul element. If div contains any children then it works fine. I'm not sure about component I file bug to, if it's wrong then please move the bug to more appropriate one.
Invalid: <div/> is parsed as an opening tag if you serve your page as text/html.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
Ah, ok, I see now IE for example acts in the same way. Just it was unexpectedly with me. Sorry for the spam.
Resolution: INVALID → DUPLICATE
(In reply to comment #2)
> Ah, ok, I see now IE for example acts in the same way. Just it was unexpectedly
> with me. Sorry for the spam.
> 

No, I was wrong about IE, it doesn't think UL element is inside DIV.
Status: RESOLVED → VERIFIED
Component: DOM: HTML → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: