Closed
Bug 1954
Opened 26 years ago
Closed 26 years ago
JC Clone doesn't clone text data
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
People
(Reporter: tupshin, Assigned: vidur)
Details
The following fragment fails to clone the text of textnode.
document.writeln(divnode.id);
document.writeln(textnode.data);
cloneddiv=divnode.cloneNode(false);
clonedtext=textnode.cloneNode(false);
document.writeln(cloneddiv.id);
document.writeln(clonedtext.data);
If divnode refers to a div whose id is divnode1, and textnode has
contents(data) of textnode1, it prints out(correcting for document.writeline
bug 1668:
divnode1
textnode1
divnode1
but fails to print out a second textnode1, indicating a failure to copy the
data of a text node. Note that
document.writeln(clonedtext)
does produce:
[object Text] indicating that the clone operation didn't fail completely.
Also this behavior is not affected by doing cloneNode(true) instead of
cloneNode(false) to indicate a recursive clone.
I haven't tested the success or lack thereof of cloned descendents in a
cloneNode(true) scenario.
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 1•26 years ago
|
||
Fixed on 1/5/1999.
qa contact set to gem@netscape.com
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•