2

I'm reading MDN documentation about the Screen width property in the Screen interface, and the documentation states the following:

Note that not all of the width given by this property may be available to the window itself. When other widgets occupy space that cannot be used by the window object, there is a difference in window.screen.width and window.screen.availWidth

When does the bolded scenario occur? The only thing that comes to mind is if there is a frame or iframe embedded on the page, but even then I'm unable to see the difference.

Is it safe to assume that that window.screen.width and window.screen.availWidth will always be identical the vast majority of the time?

ILikeTacos
  • 17,464
  • 20
  • 58
  • 88
  • 2
    https://stackoverflow.com/questions/5456582/screen-width-and-screen-availwidth-difference-in-javascript – Muhammad Faizan Nov 07 '17 at 15:35
  • 1
    When they refer to widgets, it almost sounds like Developer Tools. Technically, the window is much wider, but the tools are contracting the viewport. That's my best guess. – Serg Chernata Nov 07 '17 at 15:50

0 Answers0