Closed
Bug 3501
Opened 26 years ago
Closed 26 years ago
<BODY onload="helloWorld();"> doesn't fire
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
VERIFIED
FIXED
People
(Reporter: beard, Assigned: rickg)
Details
The following document should show "Hello Gecko." as its content, but onload in
the <BODY> tag doesn't seem to work.
<HTML>
<HEAD>
<TITLE>Testing LiveConnect</TITLE>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
function writeln(text)
{
document.write("<P>", text, "</P>");
}
function helloWorld()
{
writeln("hello Gecko.");
}
</SCRIPT>
<BODY onload="helloWorld();">
</BODY>
</HTML>
Updated•26 years ago
|
Assignee: vidur → rickg
Comment 1•26 years ago
|
||
The onload does fire and we do carry out the document.write. The problem is that
the parser caches the resultant tokens in its "misplaced tokens" list, waiting
for a BODY to come around. In this case, none will. Even putting in an explicit
document.close() (which tells the parser that its last buffer has come through)
doesn't do the right thing. Rick,
1) a call to the string Parser() routine with an isLastCall parameter of PR_TRUE
should flush the misplaced token list.
2) I don't know how we can differentiate this case from others, but for
backwards compatibility, we need to be able to display the tokens coming in
event if the document.close() didn't happen. We should talk about this.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Comment 3•26 years ago
|
||
Working now. Marking as verified.
You need to log in
before you can comment on or make changes to this bug.
Description
•