Still got a lots of linking errors!
Unlike normal browser which would show a dialog to choose whether to continue, you can just return a empty string in the handler to prevent unloading.