Smaller scope
This commit is contained in:
@@ -4,26 +4,26 @@ exports.handlers = {
|
|||||||
|
|
||||||
newDoclet: function(e) {
|
newDoclet: function(e) {
|
||||||
const doclet = e.doclet;
|
const doclet = e.doclet;
|
||||||
let cls;
|
if (doclet.kind !== 'event') {
|
||||||
if (doclet.kind == 'event') {
|
return;
|
||||||
cls = doclet.longname.split('#')[0];
|
|
||||||
if (!(cls in events)) {
|
|
||||||
events[cls] = [];
|
|
||||||
}
|
|
||||||
events[cls].push(doclet.longname);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const cls = doclet.longname.split('#')[0];
|
||||||
|
if (!(cls in events)) {
|
||||||
|
events[cls] = [];
|
||||||
|
}
|
||||||
|
events[cls].push(doclet.longname);
|
||||||
},
|
},
|
||||||
|
|
||||||
parseComplete: function(e) {
|
parseComplete: function(e) {
|
||||||
const doclets = e.doclets;
|
const doclets = e.doclets;
|
||||||
let doclet, i, ii, j, jj, event, fires;
|
for (let i = 0, ii = doclets.length - 1; i < ii; ++i) {
|
||||||
for (i = 0, ii = doclets.length - 1; i < ii; ++i) {
|
const doclet = doclets[i];
|
||||||
doclet = doclets[i];
|
|
||||||
if (doclet.fires) {
|
if (doclet.fires) {
|
||||||
if (doclet.kind == 'class') {
|
if (doclet.kind == 'class') {
|
||||||
fires = [];
|
const fires = [];
|
||||||
for (j = 0, jj = doclet.fires.length; j < jj; ++j) {
|
for (let j = 0, jj = doclet.fires.length; j < jj; ++j) {
|
||||||
event = doclet.fires[j].replace('event:', '');
|
const event = doclet.fires[j].replace('event:', '');
|
||||||
if (events[event]) {
|
if (events[event]) {
|
||||||
fires.push.apply(fires, events[event]);
|
fires.push.apply(fires, events[event]);
|
||||||
} else if (doclet.fires[j] !== 'event:ObjectEvent') {
|
} else if (doclet.fires[j] !== 'event:ObjectEvent') {
|
||||||
|
|||||||
Reference in New Issue
Block a user