backbutton
The event fires when the user presses the back button. To override the default back-button behavior, register an event listener for the backbutton event. It is no longer necessary to call any other method to override the back-button behavior.
Quick Example
document.addEventListener("backbutton", onBackKeyDown, false);
function onBackKeyDown() {
// Handle the back button
}
Windows Quirks
Throw an error in a backbutton callback to force the default behavior, which is an app exit: