Closed
Bug 67229
Opened 25 years ago
Closed 24 years ago
acessing window.closed of a window causes a an access denied exception
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: martin.honnen, Assigned: security-bugs)
References
()
Details
(Keywords: dom0)
Attachments
(1 file)
|
225 bytes,
text/html
|
Details |
With NN4 and IE4-5.5 you can open a window with a url from a remote host and
then check the window.closed property of that window. Mozilla fires an access
denied exception in this case. I think Mozilla should be compliant with NN4 and
IE here and allow access to window.closed.
Example code
var win = open('http://www.yahoo.com', 'yahoo');
setTimeout('alert("win.closed = " + win.closed);', 2000);
should show an alert but shows an error in the JavaScript console.
| Reporter | ||
Comment 1•25 years ago
|
||
| Assignee | ||
Comment 3•25 years ago
|
||
Sure, I'll make window.closed fully accessible.
Status: NEW → ASSIGNED
Netscape 6 throws an NS_NOINTERFACE exception when using the method as follow:
window.open( url, "saveAsWindow", "toolbar=no, resizable=yes, height=580,
width=780" );
It works fine without the third parameter:
window.open( url, "saveAsWindow" );
<script language="javascript">
<!--
var theDownloadWindow = null;
function WindowOpen(url)
{
if( theDownloadWindow && !theDownloadWindow.closed)
{
theDownloadWindow.focus();
return false;
}
theDownloadWindow = window.open(
url, "saveAsWindow", "toolbar=no,resizable=yes,height=580,width=780" );
theDownloadWindow.opener = this;
theDownloadWindow.focus();
}
//-->
</script>
<html>
<body>
<a HREF='#' ONCLICK='WindowOpen("http://www.yahoo.com"); return false;'>Click!
</a>
</body>
</html>
| Assignee | ||
Comment 5•25 years ago
|
||
Mass changing milestones to Moz0.9.1. Many of these bugs are dependent on the
XPConnected DOM and its associated security UI changes.
Target Milestone: --- → mozilla0.9.1
| Assignee | ||
Comment 6•24 years ago
|
||
Fix checked in.
| Assignee | ||
Comment 7•24 years ago
|
||
really this time.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•