create_buffer() expects a window as its first argument, not a buffer.
[conkeror.git] / modules / special-buffer.js
blobd935b07578b2ed80ed6df731ee5c04b3738e0c61
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/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