added refreshOnResize attribute - window resize event listener

if the HTML element contains the attribute refresh-on-resize, the window will listen to resize events, and the handler will trigger an update for the scrollbar.
This makes the scrollbar update automatically when the window size changes.