title: Bypass "Confirm Navigation" Dialog in Chrome
body: <p>I'm having a problem in Google Chrome where I am prompted with that annoying "Confirm Navigation: Leave Page / Stay On Page" dialog when I am leaving my HTML page (I'm thinking it may have to do with the fact that my HTML page has executed some JavaScript code).</p>
  
  <p>I have actually had a similar problem a month ago where Chrome wanted a confirmation upon page redirect using the <code>location.replace()</code> method, but this issue has already been resolved by adding <code>window.onbeforeunload=null</code> into the same function as the redirect code -- with many thanks to this forum :D</p>
  
  <p>I'm not actually looking for anything on how to disable the feature in Chrome per se, but I am looking to bypass the dialog programmatically in JavaScript (preferrably not jQuery). Does anyone have any ideas on how to approach this, perhaps when the page is leaving?</p>
  
  <p>I have tried using the event trigger <code>window.onbeforeunload=null;</code>, but that does not seem to work. Thanks immensely in advance!</p>