i'm binding a function to an event with
window.onbeforeunload = function() {
somefunction()
}
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