Tag: invokescript

WP8.1 InvokeScript错误

我正在开发Windows Phone 8.1应用程序。 我有一个WebBrowser类的InvokeScript方法的问题。 我在我的XAML中有这个: 当我运行此代码时: myWebBrowser.Loaded += (object sender, RoutedEventArgs e) => { webBrowser.IsScriptEnabled = true; webBrowser.InvokeScript(“eval”, “alert(‘foo’)”); }; 我在使用InvokeScript的行上得到一个System.SystemException,它告诉我: 出现未知错误。 错误:80020006。 当我为Windows Phone 8(而不是8.1)运行相同的代码时,我没有得到exception。 有什么想法我为什么会在WP 8.1中出错?