onPress( )

Adds an event handler that runs when an element on a mobile app is pressed.

A mobile element receives an event when a mobile app user presses on the element and releases.

Method Declaration
Copy
Method Parameters
handlerfunctionRequired

handler(event: Event): void The name of the function or the function expression to run when an element on a mobile app is pressed.

Returns
Return Type:MobileElement
Was this helpful?
Yes
No