3 ms·
There is also WebKitGTK for interacting with and rendering regular web content within GTK apps. It uses JavascriptCore AFAIK instead of SpiderMonkey. https://w
by esbranson 2y ago
There is also WebKitGTK for interacting with and rendering regular web content within GTK apps. It uses JavascriptCore AFAIK instead of SpiderMonkey.
https://webkitgtk.org/ https://webkitgtk.org/
#!/usr/bin/gjs
const Gtk = imports.gi.Gtk;
const WebKit = imports.gi.WebKit2;
class SimpleBrowser {
constructor() {
this.application = new Gtk.Application({
application_id: 'com.example.SimpleBrowser'
});
this.application.connect('activate', () => {
this.window = new Gtk.ApplicationWindow({
application: this.application,
title: "Simple Browser",
default_height: 600,
default_width: 800
});
this.webview = new WebKit.WebView();
this.window.add(this.webview);
this.webview.load_uri("http://www.example.com");
this.window.show_all();
});
}
}
let app = new SimpleBrowser();
app.application.run(ARGV);