diff --git a/apidoc/plugins/exports.js b/apidoc/plugins/exports.js index 10dded9b00..b1494f7879 100644 --- a/apidoc/plugins/exports.js +++ b/apidoc/plugins/exports.js @@ -5,6 +5,7 @@ */ var api = []; +var unexported = []; function collectExports(source) { var i, ii, symbol, property; @@ -56,7 +57,7 @@ exports.handlers = { } } if (api.indexOf(e.doclet.longname) > -1) { - // Add params of API symbols to the API + // Add params and events of API symbols to the API var names, name; var params = e.doclet.params; if (params) { @@ -66,12 +67,23 @@ exports.handlers = { for (j = 0, jj=names.length; j < jj; ++j) { name = names[j]; if (api.indexOf(name) === -1) { - api.push(name); + unexported.push(name); } } } } } + var fires = e.doclet.fires; + var event; + if (fires) { + for (i = 0, ii = fires.length; i < ii; ++i) { + event = fires[i].split(' ').pop(); + name = event.replace('event:', ''); + if (api.indexOf(name) === -1) { + unexported.push(name); + } + } + } } } @@ -82,7 +94,8 @@ function filter(e) { if (e.doclet) { var fqn = e.doclet.longname; if (fqn) { - e.doclet.undocumented = (api.indexOf(fqn) === -1); + e.doclet.undocumented = (api.indexOf(fqn) === -1 && unexported.indexOf(fqn) === -1); + e.doclet.unexported = (unexported.indexOf(fqn) !== -1); // Remove parents that are not part of the API var parent; var parents = e.doclet.augments; diff --git a/apidoc/template/tmpl/container.tmpl b/apidoc/template/tmpl/container.tmpl index 3a92ea4e68..67013b8021 100644 --- a/apidoc/template/tmpl/container.tmpl +++ b/apidoc/template/tmpl/container.tmpl @@ -27,8 +27,7 @@ - - +