UWP Webview Confirmbox dosen't work

Hallo Xamarin community,
i need to develope a Webbrowser for Windows 10, Android and IOS.
But i have a big problem.
The UWP Webview doesn't support a confirm box.
And the following workarround doesn't work:

string JavaScriptFunction_confirm = "window.confirm = function(){ window.external.notify
('confirm');}";

await Control.InvokeScriptAsync("eval", new[] { JavaScriptFunction_confirm });

Because you can't stop the execution of Javascript.
Does anyone have a solution for this Problem?

Tagged:

Posts

  • RyanDixonRyanDixon USMember ✭✭✭

    Silly question, did you add the website you wish to invoke JS on to the appxmanifest?
    Windows app which use this API need to be white listed either using a wildcard or each site individually.

  • ChrisDevChrisDev DEMember ✭✭

    Thanks for your nice reply Ryan....

    I surely added the Website to the appxmanifest.

    Next time, read the question correctly, be nice and think about your answer.

    Nobody wants to read "Silly question".

    We are a community and not Rivals.

Sign In or Register to comment.