Issue 1264 in google-caja: window.frames not implemented -- at least not correctly

1 view
Skip to first unread message

googl...@googlecode.com

unread,
Aug 11, 2010, 12:38:31 AM8/11/10
to google-ca...@googlegroups.com
Status: New
Owner: michaelj...@gmail.com
CC: metaweta
Labels: Type-Defect Priority-Medium jQuery

New issue 1264 by michaelj...@gmail.com: window.frames not implemented --
at least not correctly
http://code.google.com/p/google-caja/issues/detail?id=1264

What steps will reproduce the problem?

<script type="text/javascript">
if(!window.hasOwnProperty('frames')) {
alert('window.frames not defined');
alert(Object.prototype.toString.call(window.frames));
} else {
alert('window.frames is defined');
alert(window.frames.length);
}​​
</script>


What is the expected output? What do you see instead?

window.frames is supposed to be defined, and the number of frames on the
page should be shown. Instead, frames is not a property of window, but
apparently window is inheriting the frames property from its prototype.


googl...@googlecode.com

unread,
Dec 16, 2010, 4:49:07 PM12/16/10
to google-ca...@googlegroups.com
Updates:
Owner: mikesamuel
Cc: -metaweta

Comment #1 on issue 1264 by metaweta: window.frames not implemented -- at

(No comment was entered for this change.)

googl...@googlecode.com

unread,
Feb 10, 2012, 1:21:47 AM2/10/12
to google-ca...@googlegroups.com
Updates:
Status: Accepted
Owner: metaw...@gmail.com

Comment #2 on issue 1264 by metaw...@gmail.com: window.frames not

According to https://developer.mozilla.org/en/DOM/window.frames ,
window.frames === window, so window would have to be implemented as an
ArrayLike object.

window[+i] = window.frames[+i] =
document.getElementsByTagName('iframe')[+i].contentWindow

Since we don't expose the contentWindow property of iframes, we could just
implement window.length as a getter and return undefined for window[+i].

googl...@googlecode.com

unread,
Feb 10, 2012, 12:52:06 PM2/10/12
to google-ca...@googlegroups.com
Updates:
Labels: -Priority-Medium Priority-Low

Comment #3 on issue 1264 by metaw...@gmail.com: window.frames not

No one has asked for this, probably because we don't support iframes for
content, just for shims. Changing to low priority.

googl...@googlecode.com

unread,
Jul 11, 2013, 6:56:38 PM7/11/13
to google-ca...@googlegroups.com
Updates:
Status: Fixed
Owner: kpreid.switchb.org

Comment #4 on issue 1264 by kpreid.switchb.org: window.frames not
implemented -- at least not correctly
http://code.google.com/p/google-caja/issues/detail?id=1264

As of r5483, window.frames === window and window.frames.length === 0.

These are the correct answers, until such time as we support iframes (issue
1199).

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

googl...@googlecode.com

unread,
Jul 11, 2013, 6:58:50 PM7/11/13
to google-ca...@googlegroups.com

Comment #5 on issue 1264 by metaw...@gmail.com: window.frames not
implemented -- at least not correctly
http://code.google.com/p/google-caja/issues/detail?id=1264

We do support iframe shims (or did under domita), so you should test
against that before marking it fixed.

googl...@googlecode.com

unread,
Jul 11, 2013, 7:48:56 PM7/11/13
to google-ca...@googlegroups.com
Updates:
Status: Accepted

Comment #6 on issue 1264 by kpreid.switchb.org: window.frames not
implemented -- at least not correctly
http://code.google.com/p/google-caja/issues/detail?id=1264

I was confused. We do already support iframes' contentWindow (just not
loading in iframes) so this is still a bug.
Reply all
Reply to author
Forward
0 new messages