Closed
Bug 280990
Opened 20 years ago
Closed 20 years ago
DOM Implementation treats all child of TD object as "#text" node
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: dubra01, Unassigned)
Details
Attachments
(1 file)
|
836 bytes,
text/html
|
Details |
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; GIS IE6.0 Build 20031007; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5)
If a table column contains DIV object and javascript tries to obtain that child
object then it is returned as text object.
Test the below html in firefox and Mozilla and see the difference.In IE the
alert says "DIV" while in firefox it says "#text".
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>adssa</title>
<script type="text/javascript">
function calltab1(){
alert(document.getElementById("table1").tBodies[0].rows[0].cells[0].childNodes
[0].nodeName);
}
</script>
</head>
<body>
<form action="javascript:calltab1();">
<input type="submit" name="Test Table DOM" />
</form>
<table id="table1">
<thead>
<th>Header 1</th>
</thead>
<tbody>
<tr>
<td>
<div class="CLASS1">TEST AAAAAAAAA</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
Reproducible: Always
Comment 1•20 years ago
|
||
you are only seeing the first child of the cell which is a text node. the testcase shows the div is a child as well. unlike IE, mozilla keeps all text nodes in the DOM.
Comment 2•20 years ago
|
||
-> invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
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
•