ShellUI module can send a message for VaultUI and VaultCore modules, and receive simple return value from. However the data is limited to basic types and it is not possible to pass objects. Therefore it is not possible to implement callback functionality between ShellUI and VaultUI/VaultCore modules.
{
// The shellUI variable refers to ShellUI object.
var retval = shellUI.NotifyVaultEntry( "MessageFromShell", 123, "abc" );
}
The implementation on VaultUI or VaultCore would require that the notification event is handled. See the code below:
{
// the vaultEntry variable refers to VaultEntry object.
vaultEntry.Events.OnNotification = function( id, data1, data2 ) {
if( id == "MessageFromShell" )
{
// Process the message.
// Return the response.
return "received ok";
}
};
}