Handle resize of the browser window