The beginasync event
This page is specific to: WebApp.Net Version:0.50.6
December, 23rd 2009
Note: This feature is new in the WebApp.Net framework version 0.5.
This event is raised just before the XMLHTTPRequest is processed by
the WebApp.Net framework (regardless of the value of the async parameter).
This let you, for instance, enable a custom loading indicator. For more infromation about
events and how to catch them, read Working with events.
js
printcopy to clipboardMethod 5.3.1
// Add a new listener
WebApp.AddEventListener("beginasync", handler);
// Remove a previously set listener
WebApp.RemoveEventListener("beginasync", previousHandler);
Contextual information
The evtObj object parameter passed to the handler is based on the
Common event object structure.
object
The beginasync event object has the following contextual information.
- evtObj.context
-
(
Array). Base parameters of the request. - evtObj.context[0]
-
(
String). Requested URL. - evtObj.context[1]
-
(
String). Parameters if any (POST request only).
Remarks
This event is cancelable. To cancel this event (and the XMLHTTPRequest) the handler can return false.
History
| Date | Version | By | Changes |
| 20091109 | 0.5.0 | CA | Event is now cancelable |
| 20090613 | CA | Fixed context parameter description | |
| 20090307 | 0.5.0RC3 | CA | Added beginasync event and target property |
See also
Additionally you can check the following documentation references.
- Events: Working with events
- Events: Common event object structure