Registers a function to execute when user leaves the page by any of the below means,
- user navigates to another page
- user presses the back button on the device
- close method is called in the page
$m.onPause(function(eventObject) { $m.toast("Page paused."); }); |
Syntax
$m.onPause(fp_onpause)
Parameters
fp_onpause
function (required)
Function to execute when the page pauses.
context
Object (optional)
Context in which the function should execute. If not provided, the function will be executed in window context.