title: Unbind window.onbeforeunload() cancel
body: <p>i'm binding a function to an event with </p>
  
  <pre><code>window.onbeforeunload = function() {
   somefunction()
  }
  </code></pre>
  
  <p>which is working on unload as planned, but if they cancel the onbeforeunload the function is still attached, is it possible to check if the user cancels onbeforeunload</p>