Windows Phone 8调用脚本错误?
问题描述:
我从Windows Mobile应用程序中的代码调用JavaScript。 我正在使用Windows Phone SDK 8.0和Visual Studio 2012进行开发。Windows Phone 8调用脚本错误?
调用
wbInnerContent.InvokeScript('scriptName', new String[] { jsonval });
{System.SystemException: An unknown error has occurred. Error: 80020101. at Microsoft.Phone.Controls.NativeMethods.ValidateHResult(Int32 hr) at Microsoft.Phone.Controls.WebBrowserInterop.InvokeScript(String scriptName, String[] args) at Microsoft.Phone.Controls.WebBrowser.InvokeScript(String scriptName, String[] args) at OneVoiceAfrica.Header.d__16.MoveNext()}
我新的移动应用程序开发时,我得到以下isuue。 请帮我解决这个问题。
在此先感谢。
答
确保IsScriptingEnabled
为真,也许问题可能是由于Loaded event
称为过早。
webBrowser.IsScriptEnabled = true;