onshow

Syntax:

[void] window.widget.onshow = function() { }

or

[void] window.widget.onshow = toForeground;
function  toForeground()
{
 // ...
}

Description:

The onshow property is an event handler for the event of when a widget is switching from the background to the foreground. In other words, when an opened widget gains focus, the assigned callback function will be called.