Skip to content

Instantly share code, notes, and snippets.

@rmacqueen
Created August 18, 2015 14:57
Show Gist options
  • Save rmacqueen/3576f8d56c65a09b5305 to your computer and use it in GitHub Desktop.
Save rmacqueen/3576f8d56c65a09b5305 to your computer and use it in GitHub Desktop.
Minimal webkit example in GJS
const Gtk = imports.gi.Gtk;
const WebKit2 = imports.gi.WebKit2;
Gtk.init(null);
let webview = new WebKit2.WebView();
webview.load_uri('http://www.google.com');
let mwindow = new Gtk.Window({
default_width: 600,
default_height: 400
});
mwindow.add(webview);
mwindow.show_all();
mwindow.connect('destroy', function() { Gtk.main_quit() });
Gtk.main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment