Closed
Bug 223741
Opened 22 years ago
Closed 21 years ago
uncaught exception in document.write() to iframe
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: eetasoft, Unassigned)
References
()
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Firebird/0.7
To reproduce, run the following code:
<body onload="
var container=window.frames['jsrs1'];
container.document.write('<script>alert(window.title)</script>');
">
<span style="display:none">
<iframe name="jsrs1"></iframe></span>
</body>
Observed result (in javascript console) :
Error: uncaught exception:
[Exception... "Component returned failure code: 0x80004003
(NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLDocument.write]"
nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"
location: "JS frame :: <unknown filename> :: onload :: line 3" data: no]
Reproducible: Always
Steps to Reproduce:
1. Create a htm file conating the following code:
<body onload="
var container=window.frames['jsrs1'];
container.document.write('<script>alert(window.title)</script>');
">
<span style="display:none">
<iframe name="jsrs1"></iframe></span>
</body>
2. Open this file in browser
Actual Results:
Empty screen. In javascript console:
Error: uncaught exception:
[Exception... "Component returned failure code: 0x80004003
(NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLDocument.write]"
nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"
location: "JS frame :: <unknown filename> :: onload :: line 3" data: no]
Expected Results:
javascript message box with a word undefined
Comment 1•22 years ago
|
||
Nothing to do with load/save. Please do read the component descriptions before
choosing a component....
Further, the testcase worksforme with a current trunk build -- I see an alert
saying "undefined" and no error in the JS console.
Assignee: bzbarsky → general
Component: DOM Load and Save → DOM Level 0
Running Firebird nightly on win2k (Mozilla/5.0 (Windows; U; Windows NT 5.0;
en-US; rv:1.6a) Gecko/20031027 Firebird/0.7+), and visiting the sample URL, I
did not get the JS error the reporter observed, and I did get the alert box with
"undefined". Maybe unrelated, but very curiously, I did get the following error
message in the JS console when I did View Page Info:
Error: uncaught exception: [Exception... "'[JavaScript Error:
"elem.ownerDocument.defaultView has no properties" {file:
"chrome://browser/content/pageInfo.js" line: 473}]' when calling method:
[nsIDOMNodeFilter::acceptNode]" nsresult: "0x80570021
(NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame ::
chrome://browser/content/pageInfo.js :: doGrab :: line 456" data: yes]
Comment 3•22 years ago
|
||
that is indeed unrelated
Comment 4•21 years ago
|
||
The provided URL WORKSFORME (I get the expected results) in Mozilla 1.7b
2004032208 and Firefox 0.8 20040206 under XP Pro SP1.
Comment 5•21 years ago
|
||
The provided URL WORKSFORME (I get the expected messagebox with word
"undefined") in Mozilla Mozilla 1.8a2 2004062908 and Firefox 0.9.1 20040626
under XP Home SP1.
Comment 6•21 years ago
|
||
I get the expected "Undefined" dialog box. Windows XP SP2RC2, FireFox 0.9.1
20040626.
Comment 7•21 years ago
|
||
Resolving as WORKSFORME
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•