From: John Foerch Date: Tue, 13 Sep 2011 23:27:02 +0000 (-0400) Subject: window.content: new property for compatibility with firefox plugins X-Git-Tag: debian-1.0--pre-1+git160130-1~225 X-Git-Url: https://repo.or.cz/w/conkeror.git/commitdiff_plain/e957626632d2c186e81b768157398a2b1bb72fe6 window.content: new property for compatibility with firefox plugins --- diff --git a/modules/window.js b/modules/window.js index d96ab27..6b7ceb7 100644 --- a/modules/window.js +++ b/modules/window.js @@ -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