let GlobalMessageDelegateToAngularApp;

// Global JS function that is called from the C# side to send a message to the AngularApp
function SendMessageToAngularApp(id, content)
{
    try
    {
        // Use the delegate to forward the message
        GlobalMessageDelegateToAngularApp(id, content);
    }
    catch (err)
    {
    }
}

// Global JS function that is called from the AngularApp to send a message to the .Net side
function SendMessageToDotNet(message)
{
    try
    {
        // Use the function which is registered as JSExtensionFunction on the EO WebView in C#
        sendMessageToDotNet(message);
    }
    catch (err)
    {
    }
}




// Just a global helper JS function to set the message delegate.
function SetGlobalDelegates(messageDelegate)
{
    GlobalMessageDelegateToAngularApp = messageDelegate;
}

;