Closed
Bug 69236
Opened 25 years ago
Closed 23 years ago
view source of document.write() in documents does not work
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: wo, Assigned: jst)
Details
(Keywords: dom0, helpwanted)
Attachments
(1 file)
|
522 bytes,
text/html
|
Details |
I'm not sure if this is the appropriate component.
If I look at the page source of a document that is created via document.write in
a new window, all I get (with M0.8/win98) is
<html><body></body></html>
which is not what I would expect.
I would expect to see the generated HTML code.
Testcase:
<script>
onload=function(){
htmlString="<html>\n<head>\n<title>Hello</title>\n</head>\n"
+"<body>\n<h3>Hello</h3>\n"
+"Please have a look at the page source of this document.\n"
+"</body>\n</html>";
newWin=open("http://www.mozilla.org","newWin");
newWin.document.write(htmlString);
}
</script>
Oddly, this bug is mentioned at a couple of places but I can't find a bug where
it is treated seperately. It is mentioned in Bug 53683 and Bug 6119 and is
certainly related to Bug 24432, maybe also to Bug 66034 and Bug 40867.
| Reporter | ||
Comment 1•25 years ago
|
||
Comment 2•25 years ago
|
||
Hmm, yes, this is a known issue, but I cannot find any explicit bug for it either.
Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•25 years ago
|
||
just spoke w/janc, who sez this is either DOM 0 or DOM 1. trying door number
0...
Assignee: vishy → jst
Component: XP Apps → DOM Level 0
OS: Windows 98 → All
QA Contact: sairuh → desale
Hardware: PC → All
Summary: view source of document.write()n documents does not work → view source of document.write() in documents does not work
| Assignee | ||
Comment 4•25 years ago
|
||
This is hardly a crtitcal bug at this point so I'm marking this Future.
Target Milestone: --- → Future
Comment 6•24 years ago
|
||
Severity = MEDIUM [No Crash, Severe functional failure, No Cosmetic failure]
Visibility = MEDIUM [View Source on real world websites which use document.write
may fail, Gets one point of compatibility with other browsers, since it works on
all other browsers.]
Priority = Visibility * Severity
Priority = p3
adding word "qawanted" because I'm setting this priority on available data & if
someone feels otherwise then please investigate this more & feel free to change
this priority.
Keywords: qawanted
Priority: -- → P3
Comment 7•24 years ago
|
||
I would suggest that this should be wontfixed
We have DOM inspector for these situations; the view source architecture would
need a major revamp to support this.
Comment 8•24 years ago
|
||
even with the new wyciwyg wiz-bang?
Comment 9•24 years ago
|
||
hmm... with the wyciwyg thing, try it. :)
Comment 10•24 years ago
|
||
This bug may be only cosmetic for the user. But for website developer who use
JavaScript, it is just annoying. It's better to check the results of a
dynamically generated webpage.
Comment 11•24 years ago
|
||
So... I just tried this with a wyciwig url and it actually (<gasp>) worked.
Then it failed 3 times in a row.
Summary: once the wyciwyg bugs are ironed out this should actually work.
I stand by my statement that the DOM inspector is far more useful to a website
developer than view source is.
Comment 12•24 years ago
|
||
More experimenting:
1) I can only produce those failures by typing js in the location bar that
writes to the current window. Opening a new window and writing into it
allows me to view source 100% of the time _except_
2) The source can only be viewed after the load is done. That means that the
user needs to hit stop or the script needs to call document.close(). The
testcase in this bug does not do the latter, but the source can be viewed
once stop is hit.
Comment 13•24 years ago
|
||
Does that mean that with your fix, such a dynamically generated page seems to
continue loading all the time?
Comment 14•24 years ago
|
||
My fix? It's radha's fix.
And such dynamically generated pages (ones that do not call document.close())
have _always_ seemed to be "loading all the time" in Mozilla. This is because
they _are_ loading -- you could .write() some more and it would get appended to
the end. Once you document.close(), writing will wipe the old stuff out and
start over. The only difference between IE and Mozilla here is that IE stops
the throbber on such pages while Mozilla does not, since the load has never
completed. Radha's fix did not change any of this behavior.
Comment 15•24 years ago
|
||
Ok, then it's radha's fix ... but most important that it's a fix :-)
As far as the behaviour upon a missing document.close() is concerned, I remember
that phenomenum. Some people asked about that in Javascript newsgroups.
Comment 16•23 years ago
|
||
Is this still broken?
Comment 17•23 years ago
|
||
I think it's fixed. At least the demonstration in the attachment works, apart
from the fact that the page seems to continue loading until you hit the "Stop"
button. But this is intended, as far as I understood.
Probably Wolfgang should check it also once again.
Comment 18•23 years ago
|
||
Worksforme, too. Reporter, can you try this problem again on a recent build?
| Reporter | ||
Comment 19•23 years ago
|
||
Yes, works fine for me as well. I'm setting resolution = FIXED.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•