Here is how to set up mozrepl to start in the Conkeror application context. That is the main context that contains all of Conkeror's global objects.
First make a file called ~/.mozrepl-conkeror.js, which contains the code that follows.
var conkeror = Cc["@conkeror.mozdev.org/application;1"]
.getService().wrappedJSObject;
this.enter(conkeror);Now put the following code into your .conkerorrc:
let (mozrepl_init = get_home_directory()) {
mozrepl_init.appendRelativePath(".mozrepl-conkeror.js");
session_pref('extensions.mozrepl.initUrl', make_uri(mozrepl_init).spec);
}