browser_object_frames: auto-select top frame if there are no visible frames
[conkeror.git] / modules / special-buffer.js
blob158b6d14806ae2c35cd7358f202ebefef08e01af
1 /**
2  * (C) Copyright 2008 Jeremy Maitin-Shepard
3  *
4  * Use, modification, and distribution are subject to the terms specified in the
5  * COPYING file.
6 **/
8 require("buffer.js");
10 function special_buffer (window, element) {
11     this.constructor_begin();
12     keywords(arguments);
13     conkeror.buffer.call(this, window, element, forward_keywords(arguments));
14     this.generated = false;
16     var buffer = this;
17     add_hook.call(this, "buffer_loaded_hook", function () {
18             buffer.generated = true;
19             buffer.generate();
20         });
21     this.web_navigation.loadURI("chrome://conkeror-gui/content/blank.html", Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
22                                 null /* referrer */, null /* post data */, null /* headers */);
23     this.constructor_end();
26 special_buffer.prototype.__proto__ = buffer.prototype;
28 // Sub-classes must define a generate method