使用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 (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...