I have the following code for checking when a page within our website is being loaded in a window without toolbars or menubars (there are several other checks, like mobile devices and user agents, but I won't elaborate them here):
if (window.toolbar.visible !== true || window.menubar.visible !== true) {
// do some stuff
}
It works fine everywhere except for Internet Explorer 8 which returns the following error:
'window.toolbar.visible' is null or not an object
(also happens with window.menubar.visible
)
I cannot find anywhere an alternative for IE8. Any help on this?
Bonus question: Is there a decent Javascript reference like Mozilla's, but for Internet Explorer?
Thanks for reading and thinking about this problem.