gjs r21 - trunk/examples
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: gjs r21 - trunk/examples
- Date: Mon, 13 Oct 2008 17:00:54 +0000 (UTC)
Author: johan
Date: Mon Oct 13 17:00:54 2008
New Revision: 21
URL: http://svn.gnome.org/viewvc/gjs?rev=21&view=rev
Log:
add a webkit example
Added:
trunk/examples/webkit.js
Added: trunk/examples/webkit.js
==============================================================================
--- (empty file)
+++ trunk/examples/webkit.js Mon Oct 13 17:00:54 2008
@@ -0,0 +1,19 @@
+const Gtk = imports.gi.Gtk;
+const WebKit = imports.gi.WebKit;
+
+Gtk.init(0, null);
+
+let win = new Gtk.Window({type: Gtk.WindowType.toplevel });
+
+let sw = new Gtk.ScrolledWindow({});
+win.add(sw);
+
+let view = new WebKit.WebView();
+view.open("http://www.google.com/");
+sw.add(view);
+
+win.set_size_request(640, 480);
+win.show_all();
+
+Gtk.main();
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]