Closed
Bug 9213
Opened 25 years ago
Closed 25 years ago
DOM can't see the value contained in tHead of a Table
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
M13
People
(Reporter: jcarpenter0524, Assigned: vidur)
References
Details
(Whiteboard: [TESTCASE] patch added)
Attachments
(2 files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review |
Build: 1999-07-01-08-M8
All platforms
- In the spec for HTMLTableElement under tHead it says: "Returns the table's
THEAD, or null if none exists."
- Using the following code, I get "null"
- I am uncertain whether I should be getting the actual value in tHead, or if I
should be getting "[object HTMLTableSectionElement]", but I know I should not be
getting "null"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>test</TITLE></HEAD>
<BODY>
<TABLE border=1>
<THEAD>tHead text</THEAD>
<TR><TD>The spec says: </TD>
<TD>Returns the table's THEAD, or null if none exists.</TD></TR>
<TR><TD>stuff</TD>
<TD>More stuff</TD></TR>
</TABLE>
<SCRIPT TYPE="text/javascript">
document.write(oList=document.firstChild.childNodes[1].childNodes[2].tHead);
</SCRIPT>
</BODY></HTML>
Reporter | ||
Updated•25 years ago
|
QA Contact: gerardok → janc
Reporter | ||
Comment 1•25 years ago
|
||
same goes for tFoot
Reporter | ||
Comment 2•25 years ago
|
||
Oops, the previous code had an error, this is the correct HTML code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>test</TITLE></HEAD>
<BODY>
<TABLE border=1>
<THEAD><TR>tHead text</TR></THEAD>
<TR><TD>The spec says: </TD>
<TD>Returns the table's THEAD, or null if none exists.</TD></TR>
<TR><TD>stuff</TD>
<TD>More stuff</TD></TR>
</TABLE>
<SCRIPT TYPE="text/javascript">
document.write(document.firstChild.childNodes[1].childNodes[2].tHead);
</SCRIPT>
</BODY></HTML>
Comment 3•25 years ago
|
||
Updated•25 years ago
|
Whiteboard: [TESTCASE] tHead (and tFoot) properties not implemented
Comment 4•25 years ago
|
||
Directly accessing a thead works - document.getElementsByTagName( "thead" )[0];
Using the tHead property doesn't - tablenode.tHead;
Tested on Win98 19990816 nightly build
Target Milestone: M11
Do we need this for beta? Tentatively saying ``yes''.
Updated•25 years ago
|
Target Milestone: M11 → M12
Comment 6•25 years ago
|
||
Moving to M12.
Comment 7•25 years ago
|
||
This is the problem:
nsHTMLTableElement::GetTHead iterates over all children of the table and
compares the tagnames until it finds a <thead> tag. The problem is that the
tagnames are retrieved using GetTagName and compared to the thead tag in
nsHTMLAtoms.
The former returns elements in upper case and the latter contains elements in
lower case.
Inserting
theadAsString.ToUpperCase()
after
nsHTMLAtoms::thead->ToString(theadAsString);
fixes the problem but it should maybe be fixed elsewhere?
(There is a new implementation in the method commented out there because
GetElementsByTagName wasn't implemented, maybe this can be uncommented now?)
Assignee | ||
Comment 8•25 years ago
|
||
Moving off M12 radar for the time being. One or more might get back once I get a
chance to really look at them.
Assignee | ||
Comment 9•25 years ago
|
||
In an attempt to get my bug list in order again, marking all the bugs I have
currently as ASSIGNED.
Whiteboard: [TESTCASE] tHead (and tFoot) properties not implemented → [TESTCASE] tHead (and tFoot) properties not implemented [WIP]
Comment 10•25 years ago
|
||
working on it...
Comment 11•25 years ago
|
||
Whiteboard: [TESTCASE] tHead (and tFoot) properties not implemented [WIP] → [TESTCASE] patch added
Comment 12•25 years ago
|
||
I added a patch that fixes this bug for thead and tfoot. added some extra error
checking while I was at it. only took a few minutes, since GetElementsByTagName
has been implemented.
awaiting your review, v.
Assignee | ||
Comment 13•25 years ago
|
||
*** Bug 22678 has been marked as a duplicate of this bug. ***
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 14•25 years ago
|
||
Fixed on 1/18/2000.
Comment 15•24 years ago
|
||
*** Bug 39214 has been marked as a duplicate of this bug. ***
Updated•24 years ago
|
Component: DOM Level 1 → DOM HTML
Updated•24 years ago
|
QA Contact: janc → desale
Comment 16•24 years ago
|
||
QA contact Update
Comment 18•23 years ago
|
||
verified on build 2001-06-21-11-0.9.1 (windows 2000)...marking as verified
Status: RESOLVED → VERIFIED
Comment 19•23 years ago
|
||
verified on linux
Comment 20•23 years ago
|
||
verified on linux
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•