Skip to content

SendEvent = (eventName, data?) => Promise<{ data?: unknown; }>

. Client to fire events that the Vault Java SDK PageController onEvent method handles.

string

The name of the event

unknown

JSON data send to the server event handler

Promise<{ data?: unknown; }>

A JsonObject which is returned from the response from the Vault Java SDK onEvent method

try { const response = await sendEvent("myEvent", { myNumValue: 1, myStringValue: "hello" }); if (response?.data) { console.log("onEvent returned data"); } else { console.log("onEvent returned without data"); } } catch (e) { console.log('sendEvent error: ', e); }