Skip to content

Instantly share code, notes, and snippets.

@hadess
Created February 18, 2019 11:55
Show Gist options
  • Save hadess/9e1bfd1d2975db9452af93a0b0bfe895 to your computer and use it in GitHub Desktop.
Save hadess/9e1bfd1d2975db9452af93a0b0bfe895 to your computer and use it in GitHub Desktop.
Simple WebKit test
#!/usr/bin/python3
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('WebKit2', '4.0')
from gi.repository import Gtk, WebKit2
window = Gtk.Window()
def on_destroy(window):
Gtk.main_quit()
window.connect("destroy",on_destroy)
window.set_default_size(800,600)
webview = WebKit2.WebView()
window.add(webview)
window.show_all()
webview.load_uri("https://www.youtube.com/html5")
Gtk.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment