I’m using a code-converter to change my WiseJ VB to C#. Do you know the C# equivalent of this function?
It appears this was documented here, but its 404 now: https://wisej.com/docs/2.0/html/M_Wisej_Web_Application_Eval_1.htm
Public Sub DetectIOSWebAppStandalone()
‘does a one-time check of window.navigator.standalone and writes a session flag
‘so we know if we have been launched in iOS webview
Application.Eval(“window.navigator.standalone”, Sub(a As Boolean)
If a = True Then
Application.Session(“isIOSstandalone”) = True ‘its standalone mode
Else
Application.Session(“isIOSstandalone”) = False ‘its not standalone mode
End If
End Sub)
End Sub
Am I correct that this is the correct syntax?
Application.Eval(“window.navigator.standalone”, (dynamic a) =>
{
if (a == true)
{
Application.Session.isIOSstandalone = true;
} else
{
Application.Session.isIOSstandalone = false;
}
});
thanks
Hi Andrew,
Doc has move there https://docs.wisej.com/docs/controls/general/application#javascript
You function must be like this
Application.Eval(“window.navigator.standalone”, (a) => // Type of 'a' is dynamic
{
if (a == true)
{
Application.Session.isIOSstandalone = true;
} else
{
Application.Session.isIOSstandalone = false;
}
});
Happy codidng,
Kevin (ITG)
Please login first to submit.