XObjectBase/WebKitWebView.js
authorAlan Knowles <alan@akbkhome.com>
Fri, 26 Nov 2010 07:43:18 +0000 (15:43 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 26 Nov 2010 07:43:18 +0000 (15:43 +0800)
XObjectBase/WebKitWebView.js

index 951e43a..0adb51e 100644 (file)
@@ -6,18 +6,26 @@ XObject = imports.XObject.XObject
 // children are not added at init / but at show stage..
 // listener is added on show..
 // we should really add a hock to destroy it..
-WebKitWebView  = {
-    pack : function(parent, item)
-    {
-        
-        if (XObject.type(parent.xtype) == 'GtkScrolledWindow') {
-            parent.el.add(this.el);
-            return;
-        }
-        XObject.fatal("do not know how to pack webview to" +  XObject.type(parent.xtype));
-        
-    } 
-     
 
-};
\ No newline at end of file
+
+WebKitWebView = XObject.define(
+    function(cfg) {
+        XObject.call(this, cfg);
+     
+    }, 
+    XObject,
+    {
+        pack : function(parent, item)
+        {
+            
+            if (XObject.type(parent.xtype) == 'GtkScrolledWindow') {
+                parent.el.add(this.el);
+                return;
+            }
+            XObject.fatal("do not know how to pack webview to" +  XObject.type(parent.xtype));
+            
+        } 
+    }
+); 
+  
\ No newline at end of file