Commit 9a8975f5 authored by JC Brand's avatar JC Brand

Add two more emitted events. Updates #48

parent d95610cb
......@@ -431,6 +431,7 @@
}
}
}, this));
converse.emit('onReady');
};
// Backbone Models and Views
......@@ -3406,6 +3407,7 @@
this.onConnected();
}
if (this.show_controlbox_by_default) { this.controlboxtoggle.showControlBox(); }
converse.emit('onInitialized');
};
return {
'initialize': function (settings, callback) {
......
......@@ -593,6 +593,19 @@ Event Types
Here are the different events that are emitted:
* **onInitialized**
``converse.on('onMessage', function () { ... });``
Triggered once converse.js has been initialized.
* **onReady**
Triggered after a connection has been established and converse.js has
got all its ducks in a row.
``converse.on('onReady', function (message) { ... });``
* **onMessage**
``converse.on('onMessage', function (message) { ... });``
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment