views:

777

answers:

2

I'm writing a javascript that relies on top.document but I'm not sure if I can assume all the major browsers supports it or not.

Is top.document cross-browser compatible?

+1  A: 

According to W3Schools, window.top is supported in IE (since v4), FF (v1), and Opera (v9). I can personally vouch for it working in Safari as I just tried their example code in my own browser. :-)

tvanfosson
A: 

I've never used it, but I believe it is.

Nested frames are so passe.

Check out this handy Quirksmode article on the topic.

Diodeus