0

By "browser-chrome elements", I mean things like the status bar, bookmarks bar, etc. I see properties like window.statusbar.visible, but it seems to be true whether or not I show it, at least according to firebug. Am I missing something?

(Note: ultimately, I need to be able to get this info from a cross-site iframe for it to be useful to me, but even with a top-level script, I'm seeing this.)

Yi Jiang
  • 49,435
  • 16
  • 136
  • 136
sprugman
  • 19,351
  • 35
  • 110
  • 163
  • What purpose would knowing if the user's statusbar is visible serve? – drudge Feb 02 '11 at 19:35
  • it's not just the status bar, it's all the chrome, but it would help determine the viewport dimensions in a situation where I can get the outer dimensions of the window, but not the inner ones. http://stackoverflow.com/questions/4869000/viewport-of-browser-from-cross-site-iframe – sprugman Feb 02 '11 at 19:45
  • but also, I just find it odd that window.statusbar.visible is always true, so I'm curious. – sprugman Feb 02 '11 at 19:47
  • What are your javascript execution settings? http://imgur.com/rb9dr – Gelatin Feb 03 '11 at 01:53
  • same as in that screen shot. (the default, I assume.) – sprugman Feb 03 '11 at 17:14

1 Answers1

0

window.statusbar.visible and related properties only tell you whether your popup window was opened with or without the statusbar chrome flag, and even then, that requires the dom.disable_window_open_feature.status preference to be turned off. My understanding is that the "pill" on the Mac that toggles all the toolbars also affects this flag. Other ways of hiding chrome (e.g. via View - Show/Hide - Status Bar) cannot be detected by web pages.

Neil
  • 54,642
  • 8
  • 60
  • 72