Addon SDK bootstrap.js with custom startup

I would like to run:
var { startup, shutdown, install, uninstall } = new Bootstrap(rootURI);
with custom startup. Startup should run the following as well:
windowListener.register();

I tried:
function startup(aData, aReason) {
windowListener.register();
new Bootstrap(rootURI);
}
Would be great if someone could help. Thanks

Isn’t registering the windowListener in the top level module enough? It is executed immediately after everything else has come together.

You’re right. In the mean time I switched it already. I’m now initializing the windowListner in the index.js by using:
exports.main = function (options, callbacks) {
windowListener.register();
};
exports.onUnload = function (reason) {
if (reason == ‘shutdown’) return;
windowListener.unregister();
};

Issue solved