Allow custom events and do not collect events from methods

This commit is contained in:
Andreas Hocevar
2014-05-15 20:25:26 +02:00
parent 0d10314d4f
commit a75d944311
2 changed files with 18 additions and 13 deletions

View File

@@ -29,15 +29,11 @@ exports.handlers = {
event = doclet.fires[j].replace('event:', '');
if (events[event]) {
fires.push.apply(fires, events[event]);
} else {
fires.push(doclet.fires[j]);
}
}
doclet.fires = fires;
} else {
eventClass = classes[doclet.longname.split('#')[0]];
if (!eventClass.fires) {
eventClass.fires = [];
}
eventClass.fires.push.apply(eventClass.fires, doclet.fires);
}
}
}