Skip to content

Instantly share code, notes, and snippets.

@rmacqueen
Last active August 29, 2015 14:12
Show Gist options
  • Save rmacqueen/bc474fd3dd028d64fdfe to your computer and use it in GitHub Desktop.
Save rmacqueen/bc474fd3dd028d64fdfe to your computer and use it in GitHub Desktop.
const Gtk = imports.gi.Gtk;
const WebKit2 = imports.gi.WebKit2;
const Lang = imports.lang;
Gtk.init(null);
// WebKit2.WebContext.get_default().register_uri_scheme('foo', function () {})
const MyWebView = new Lang.Class({
Name: 'MyWebView',
GTypeName: 'MyWebView',
Extends: WebKit2.WebView,
_init: function (props) {
props = props || {};
this.parent(props);
this.web_context.register_uri_scheme('ekn', function () {});
},
});
let webview = new MyWebView();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment