Working with events
This page is specific to: WebApp.Net Version:0.20.30.50.6
Some information in this page are deprecated or obsolete. Please refer to the history for specific changes.
WebApp.Net provides some new events to let you to catch common framework activities such as: framework loaded and ready to go, start and end of sliding effect, device orientation change, ajax processing and so on. The list of available events is presented below.
The AddEventListener method
This method let you register an new event handler. You can add more than a single handler for an event with mutilple call to this method.
WebApp.AddEventListener(eventName, handler);
Register an event listener.
- eventName
- Madatory
(
String). The name of the event to listen to, from the following list: - handler
- Madatory
(
Function). The function to call when the event is raised. The handler will received an event object containing contextual information.
It has the following signature:MyFunction(evtObj).
Common event object structure
All events have a common structure as shown below:
The event object has the following properties.
- type
-
(
String). Name of the actual event. - context
-
(
Object). The context data of the event. Read the event detail for more information about its content. - windowWidth
-
(
Number). Current client window width. - windowHeight
-
(
Number). Current client window height.
History
| Date | Version | By | Changes |
| 20090307 | 0.5.0RC3 | CA |
Removed error, success (use endasync instead) Added beginasync, willasync, endasync events |
| 20080609 | 0.3.5m | CA |
Added error, success and tabchange events Added target property |