onPause

Page

Registers a function to execute when user leaves the page by any of the below means,

  1. user navigates to another page
  2. user presses the back button on the device
  3. 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.