Closed
Bug 17351
Opened 25 years ago
Closed 24 years ago
{doc.open}document.write to opened window during load not done/without effect
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
FIXED
M16
People
(Reporter: martin.honnen, Assigned: jst)
References
()
Details
(Whiteboard: [nsbeta2+][jst])
Attachments
(1 file)
(deleted),
text/html
|
Details |
During load of an html document I use the following js
function writeToWindow () {
w.document.open();
w.document.write('<HTML><HEAD><\/HEAD><BODY><H1>Kibology<\/H1><\/BODY><\/HTML>')
;
w.document.close();
}
var w = window.open ('about:blank', 'w1');
writeToWindow();
The new window opens with about:blank but the new content doesn't appear. A
subsequent document.write attempt triggered from
<BUTTON ONCLICK="writeToWindow()">
write to opened window
</BUTTON>
shows up
Reporter | ||
Comment 1•25 years ago
|
||
Comment 2•25 years ago
|
||
In an attempt to get my bug list in order again, marking all the bugs I have
currently as ASSIGNED.
Comment 4•25 years ago
|
||
Adding {doc.open} to summary to track related bugs. Marking M15 for now - we
should try to get this one done earlier rather than later.
Summary: document.write to opened window during load not done/without effect → {doc.open}document.write to opened window during load not done/without effect
Target Milestone: M15
Comment 5•25 years ago
|
||
works for me on win98 M14, the new window opens blank, and when you click the
button Kibology is written to the window.
Comment 6•25 years ago
|
||
In the test case the word "Kibology" should appear both when you load the
document and when you click the button. The new window that opens should never
appear blank (except for a fraction of a second after it is created and before
"Kibology" is written to it).
What rufus@nonstuff.de observed is actually the buggy behavior rather than a
"works for me": the new window opened blank, and "Kibology" did not appear until
he clicked on the button.
Comment 7•25 years ago
|
||
sorry, totally misread the script :o but I looked into it some more and this is
very strange. usually (not always) if you switch to the new window imediatly as
it's opened you'll see "Kibology" shown there while the page is still loading,
but once the throbber stops, it disapears. The same thing happens if you change
the call from the <script> block to <body onLoad>. It seems to be that for some
reason the opened window gets redrawn or something and the text is wipped.
Comment 9•25 years ago
|
||
Nominating nsbeta2. We have to start drawing a line on DOM0 backward
compatibility; these bugs are supposed to be a high priority for nsbeta2 per the
beta2 criteria.
Comment 10•25 years ago
|
||
Setting to [nsbeta2+]. document.write() is one of the most widely-used
JavaScript commands of all. Even across windows, you see it a fair amount.
Whiteboard: [nsbeta2+]
Assignee | ||
Comment 11•25 years ago
|
||
Taking this bug off Vidurs list.
Assignee: vidur → jst
Status: ASSIGNED → NEW
Assignee | ||
Comment 12•25 years ago
|
||
I have a fix for this in my tree, need to do some more testing before checking
in.
Status: NEW → ASSIGNED
Whiteboard: [nsbeta2+] → [nsbeta2+][jst]
Assignee | ||
Comment 13•24 years ago
|
||
The fix for this is checked in, marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 15•24 years ago
|
||
As shown in #56539, this bug should be reopened for m18-2000101014.
You need to log in
before you can comment on or make changes to this bug.
Description
•