if (self)
document.write( "self<br>");
if (self === window)
document.write( "self === window<br>");
else if (self == window)
document.write( "self == window<br>");
if (self === document)
document.write( "self === document<br>");
else if (self == document)
document.write( "self == document<br>");
if (window === document)
document.write( "window === document<br>");
else if (window == document)
document.write( "window == document<br>");
IE :-
self
self == window
self == document
window == document
FF, Opera, Safari :-
self
self === window
Aaron
Here's alink to the 'self' test page :-
http://www.aarongray.org/Test/JavaScript/self-test.html
Aaron
So why use 'self' at all ?
Why not just use 'window' instead for FF, Opera, and Safari ?
Are there some browsers that only support 'innerHeight/Width' on self ?
But then 'document.body.clientHeight/Width' give the same values as
'window.innerHeight/Width' so why use those.
I have only been testing this on the latest versions of the browsers, so I
maybe overlooking older incompatibilities. So if anyone can shed more light
on older browsers behaviour with/without this test page I would be most
thankful
Aaron
I have found 'document.body.clientHeight/Width' may not be very useful
compared to 'window.innerHeight/Width' as on Safari 2.0.4 it is minus
document.body.margin'. And on Konqueror clientHeight/Width is much smaller
than the actual client area.
Aaron