I am working on a WinJS project and trying to use the invokeScriptAsync to call a method on a x-ms-webview. It is not working and the error I am getting is not helpful. I am only getting an "Unknown Error." I have never had any problems before, the only difference this time is the method I am calling is part of any object rather than a global javascript method. My call looks something like this:
webview.invokeScriptAsync("object.subobject1.subobject2.method", "arg1", "arg2", "arg3").start();
The only thing I can think of is that the function has to be a global, but I haven't found any documentation to support that. Any ideas?
The only way I have been able to make calling methods on an object work is by passing eval to the invokeScriptAsync method:
webview.invokeScriptAsync("eval", "object.subobject1.subobject2.method('arg1', 'arg2', 'arg3');").start();