Created
February 18, 2019 11:55
-
-
Save hadess/9e1bfd1d2975db9452af93a0b0bfe895 to your computer and use it in GitHub Desktop.
Simple WebKit test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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