Windows Store App with WebView throws DISP_E_UNKNOWNNAME error when invoking a script

2

Yes, I do know I need to wait for Navigation_Completed to fire.

I have a Windows 8 Store application. In it is a page containing a WebView and a Button. When the Button is clicked, the user is navigated to a new screen. When they are done, they are navigated back to the page with the WebView, and an Input in the WebView should be filled in based on what happened when they clicked the button.

I am doing this with JavaScript invoke as such (w is the WebView).

await w.InvokeScriptAsync("foo", new string[] { "bar" });

This happens in the OnNavigatedTo area of the page because the page is in fact already loaded/completed so the Navigation_Complete event never fires at this point.

The error generated is "Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME)". Any thoughts?

c#
webview
windows-runtime
winrt-async
asked on Stack Overflow Apr 14, 2014 by Paul

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0