Closed Bug 285369 Opened 19 years ago Closed 19 years ago

"Permission denied" invoking HTMLDocument.getElementById after doing cached-reload (F5) of simple page making use of "javascript:" pseudo-urls to fill frames

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED EXPIRED

People

(Reporter: russtrotter, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US;rv:1.7.6) Gecko/20050302 Firefox/1.0.1

Given the following HTML:
<html>
<body onload="myOnLoad()">
<script language="javascript">
function topFunc() {
  alert("this is topfunc");
}
function fillOuterFrame(w) {
  w.document.write('<frameset rows="30%,70%">'+
                   '  <frame name="innerframe"
src="javascript:this.parent.parent.fillInnerFrame(this)"/>' +
                   '</frameset>');
  w.document.close();
}
function fillInnerFrame(w) {
  w.document.write('<div id="innerDiv">This is the inner frame</div>');
  w.document.close();
}
function myOnLoad() {
  var oframe = top.frames["oframe"];
  var innerFrame = oframe.frames["innerframe"];
  var innerDiv = innerFrame.document.getElementById("innerDiv");
  innerDiv.innerHTML = 'This is DHTML'; 
}
</script>
<iframe name="oframe" height="100%" width="100%"
src="javascript:this.parent.fillOuterFrame(this)"></iframe>
</body>
</html>

It also failes on Win32 Firefox 1.0.1 with the same error.
Things _do_ work if I specify "real" documents in the "src" attributes to the
frame (e.g. 'src="myfile.html"') as opposed to javascript pseudo-URL's

Is this a case where the "same domain" rules are getting tripped up by the
"javascript:" url's?

Reproducible: Always

Steps to Reproduce:
1. Load the above HTML (no errors should display in console)
2. Hit F5 (or just the Reload button) (NOT shift-f5)
3. See error report in javascript console


Actual Results:  
"Error: uncaught exception: Permission denied to get property
HTMLDocument.getELementById" displays in javascript console

Expected Results:  
no error message should be reported.
Assignee: firefox → general
Component: General → DOM: Level 0
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
You need to log in before you can comment on or make changes to this bug.