Closed Bug 3874 Opened 26 years ago Closed 26 years ago

DOM: HTMLTitleElement.text string returning 'undefined'

Categories

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

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ckritzer, Assigned: vidur)

References

()

Details

On MacOS 8.5/Win95/RedHat Linux 5.2 for 99075 (March 16th) build on the following testcases: 1) httl001.html 1a) Expected action/result: Grab the HTMLTitleElement.text string
Assignee: vidur → rickg
Again, this is a problem with the way we're dealing with the DOCTYPE definition at the top of the page. You'll notice that this works when you remove it. As with the previous bug related to this problem, the DOCTYPE definition is being treated by the parser as a comment and, because of problems with the HTMLContentSink, is being placed inside the HEAD. As a result, document.firstChild.firstChild.firstChild is being resolved as the DOCTYPE "comment" and not the TITLE element. In general, I'd recommend using safer mechanisms for finding nodes such as document.getElementsByTagName(). Reassigning to RickG to fix.
Again, this is a problem with the way we're dealing with the DOCTYPE definition at the top of the page. You'll notice that this works when you remove it. As with the previous bug related to this problem, the DOCTYPE definition is being treated by the parser as a comment and, because of problems with the HTMLContentSink, is being placed inside the HEAD. As a result, document.firstChild.firstChild.firstChild is being resolved as the DOCTYPE "comment" and not the TITLE element. In general, I'd recommend using safer mechanisms for finding nodes such as document.getElementsByTagName(). Reassigning to RickG to fix.
*** Bug 3876 has been marked as a duplicate of this bug. ***
*** Bug 3871 has been marked as a duplicate of this bug. ***
QA Contact: 4015 → 4120
Assignee: rickg → vidur
Vidur -- the doctype as comment problem is fixed (though I plan to add a new api to the contentsink to accept the doctype from me). There is still a centering problem on the page (which may be mine -- I havent checked). Aside from that -- please verify that the original intent of this bug is fixed.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
More improvements to <SCRIPT> oddities in parser.
Status: RESOLVED → VERIFIED
Verified: MacOS 8.5 99081 Build Windows 95 99081 Build RedHatLinux 5.2 99081 Build Vidur, thanks for the extra info about document.getElementsByTagName(). I will add this to my testcases.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.