How can I determine the height of a horizontal scrollbar, or the width of a vertical one, in JavaScript?
For me, the most useful way was
(window.innerWidth - document.getElementsByTagName('html')[0].clientWidth)
with vanilla JavaScript.