The sendEvent
method takes the following three four
parameters:
Name | Description | Type | Use |
---|---|---|---|
data | A message sent by the sender web application. It may be a JSON object. | object |
required |
destination | A URL address or application ID of the target web application. | string |
optional |
options | A configuration object that contains only one parameter. The "start" boolean parameter
is passed to specify if the target application should be started. It will be ignored if
the destination parameter has not been set. The default value of
this parameter is "true". |
object |
optional |
callbacks | Passed to verify whether it was possible to deliver the event. It may be used only if the
|
object |
optional |
If the destination
parameter is "null", the event will be broadcast to
all registered recipient web applications, except for the sender application. If it is set
to the sender application, the event will be ignored.
The sendEvent
method's callbacks
object can be
structured as follows:
{ onSuccess: function() {...}, onFailure: function(error) {...} }
The table below lists all callbacks supported by the method.
Name | Description | Return type |
---|---|---|
onSuccess |
Called when the function finishes without an error. |
undefined |
onFailure |
Called when an error occurs. Possible failure types are listed in the Constants section of the InterAppCommunicator article). |
undefined |