如何解决使用C#WebKitGTK在ubuntu上的本地主机上打开JavaScript网页时出现问题
我正在使用C#WebKitGTK构建一个简单的浏览器,当使用诸如google.com之类的任何网站url时,它都能正常工作,但是当我尝试打开在localhost上运行的javascript网页时,它将在控制台上返回此错误:
**消息:控制台消息:http:// localhost:5000 / static / js / 3.5fcef7e3.chunk.js @ 1:ReferenceError:找不到变量:Intl
但是Firefox可以正常打开网页,没有任何问题,那么有什么解决办法?!
这是我的代码:
using System;
using Gtk;
using WebKit;
[Obsolete]
public partial class MainWindow : Gtk.Window
{
public static WebView webView;
public MainWindow() : base(Gtk.WindowType.Toplevel)
{
Build();
webView = new WebView();
this.scrolledwindow4.Add(webView);
this.vpaned2.Add(this.scrolledwindow4);
this.Add(this.vpaned2);
if ((this.Child != null))
{
this.Child.ShowAll();
}
this.DefaultWidth = 1140;
this.DefaultHeight = 731;
this.Show();
this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent);
this.button.Clicked += new global::System.EventHandler(this.OnButtonClicked);
}
protected void OnDeleteEvent(object sender,DeleteEventArgs a)
{
Application.Quit();
a.RetVal = true;
}
protected void OnButtonClicked(object sender,EventArgs e)
{
webView.Open(url.Text);
}
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。