{doc.open}document.write to opened window during load not done/without effect

VERIFIED FIXED in M16

Status

()

P3
normal
VERIFIED FIXED
19 years ago
18 years ago

People

(Reporter: martin.honnen, Assigned: jst)

Tracking

Trunk
x86
Windows 95
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta2+][jst], URL)

Attachments

(1 attachment)

(Reporter)

Description

19 years ago
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

19 years ago
Created attachment 2425 [details]
bug demo

Updated

19 years ago
Blocks: 17907

Comment 2

19 years ago
In an attempt to get my bug list in order again, marking all the bugs I have
currently as ASSIGNED.

Comment 3

19 years ago
*** Bug 26702 has been marked as a duplicate of this bug. ***

Updated

19 years ago
Blocks: 24698

Comment 4

19 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

19 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.
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

19 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 8

19 years ago
Moving to m16
Target Milestone: M15 → M16
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.
Keywords: 4xp, nsbeta2
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

19 years ago
Taking this bug off Vidurs list.
Assignee: vidur → jst
Status: ASSIGNED → NEW
(Assignee)

Comment 12

19 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

19 years ago
The fix for this is checked in, marking FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED

Updated

19 years ago
No longer blocks: 17907

Comment 14

19 years ago
Verified with 2000-07-05-09.
Status: RESOLVED → VERIFIED

Comment 15

18 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.