onClose

Page

Registers a function to execute on close of page.

$m.onClose(function(eventObject) {

$m.toast("Page closes.");

});

Syntax

        $m.onClose(fp_onclose[, context])

Parameters

fp_onclose

function (required)

Function to execute when the page closes.

context

Object (optional)

Context in which the function should execute. If not provided, the function will be executed in window context.