I am trying to calculate the viewport's width, but excluding the scroll-bar's width. Someone on SO said window.innerWidth
can do this, but it takes the scroll-bar into account.
I tried using document.body.clientWidth
but when the window is horizontally scrolled, this fails.
Even if document.body.clientWidth > window.innerWidth
, I need to get the window's width, but without scroll-bar's width
Does anyone have any idea?