from gi.repository import Gtk, WebKit

def on_cleared(*args):
    pass

browser = WebKit.WebView()
browser.connect('window-object-cleared', on_cleared)
browser.load_uri('http://www.google.com')
Gtk.main()
