Working with events

willasync event

This event is raised just before the asynchronous request is sent (regardless of the value of the async parameter). This let you easily modify the XMLHttpRequest object and, for intance, append additional header parameters. To catch this event use the WA.AddEventListener function.

WebApp.AddEventListener("willasync", handler);

Contextual informations

The willasync event object has the following contextual informations:

evtObj.context
Array. Based parameters of the request.
evtObj.context[0]
String. Requested URL.
evtObj.context[1]
String. Parameters if any (POST request only).

And have the following additional property:

evtObj.target
Object. XMLHttpRequest object.

Changes History
20090613N/ACAFixed context parameter description
20090307v0.5.0RC3CAAdded willasync event and target property
Saturday, 20-Jun-2009 14:40:02 CEST