window.content: new property for compatibility with firefox plugins
authorJohn Foerch <jjfoerch@earthlink.net>
Tue, 13 Sep 2011 23:27:02 +0000 (13 19:27 -0400)
committerJohn Foerch <jjfoerch@earthlink.net>
Thu, 29 Nov 2012 03:36:08 +0000 (28 22:36 -0500)
modules/window.js

index d96ab27..6b7ceb7 100644 (file)
@@ -174,9 +174,13 @@ function window_initialize (window) {
         tag = window.args.tag;
     window.tag = generate_new_window_tag(tag);
 
-    // Add a getBrowser() function to help certain extensions designed
+    // Add a getBrowser() and content to help certain extensions designed
     // for Firefox work with conkeror
     window.getBrowser = window_get_this_browser;
+    window.__defineGetter__('content',
+                            function () {
+                                return this.buffers.current.browser.contentWindow;
+                            });
 
     window_initialize_early_hook.run(window);
     delete window.window_initialize_early_hook; // used only once