title: Detect when window vertical scrollbar appears
body: <p>Is there a simple and reliable solution for detecting window vertical scrollbar appears/disappears?</p>
  
  <p><code>window.onresize</code> isn't triggered when after JavaScript DOM manipulation page becomes high enough for appearing scrollbar.</p>
  
  <p>In this very similar post <a href="https://stackoverflow.com/questions/2146874/detect-if-a-page-has-a-vertical-scrollbar">Detect if a page has a vertical scrollbar</a> described solution how to detect whether scrollbar is present or not, but I need to know when exactly it appears.</p>