update api for modules, add n-series pause, update notes
This commit is contained in:
parent
522cefabb4
commit
8d03dd53de
6 changed files with 26 additions and 16 deletions
|
|
@ -551,12 +551,15 @@ self.kiri.license = exports.LICENSE;
|
|||
******************************************************************* */
|
||||
|
||||
function sendOnEvent(name, data) {
|
||||
if (name && onEvent[name]) onEvent[name](data);
|
||||
if (name && onEvent[name]) onEvent[name].forEach(function(fn) {
|
||||
fn(data);
|
||||
});
|
||||
}
|
||||
|
||||
function addOnEvent(name, handler) {
|
||||
if (name && typeof(name) === 'string' && typeof(handler) === 'function') {
|
||||
onEvent[name] = handler;
|
||||
onEvent[name] = onEvent[name] || [];
|
||||
onEvent[name].push(handler);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue