Sha256: b88fcf71f0ae213b231a3caa916bd16597bacdf4e93d66174385e82af87d1dd6
Contents?: true
Size: 432 Bytes
Versions: 11
Compression:
Stored size: 432 Bytes
Contents
require 'gir_ffi-gtk3' GirFFI.setup :WebKit2, '4.0' Gtk.init win = Gtk::OffscreenWindow.new web_view = WebKit2::WebView.new win.add(web_view) web_view.signal_connect "load-changed" do |_, event, _| case event when :finished pixbuf = win.get_pixbuf pixbuf.savev("google.png", "png", nil, nil) puts web_view.get_title Gtk.main_quit end end web_view.load_uri('http://www.google.com/') win.show_all Gtk.main
Version data entries
11 entries across 11 versions & 1 rubygems