- JSDoc
JSDoc is a syntax for adding inline API documentation to
JavaScript source code. This is distinct from the various tools that parse and manipulate code that follows the JSDoc syntax.The JSDoc syntax is similar to the
Javadoc syntax, used for documenting Java code, but is specialized to work with JavaScript's more dynamic syntax and therefore unique, as it is not completely compatible with Javadoc. However, like Javadoc, JSDoc allows the programmer to create doclets and tags which can then be translated into published output, likeHTML orRTF .JSDoc tags
:
Example
An example of using JSDoc to document a constructor.
History
The earliest example of using a Javadoc-like syntax to document JavaScript was released in 1999 with the Netscape/Mozilla project named [http://lxr.mozilla.org/mozilla/source/js/rhino/examples/jsdoc.js Rhino] .
JSDoc In Use
* The JSDoc syntax has been described at length in the Apress book "Foundations of Ajax" ISBN 1-59059-582-3.
* The [http://www.interaktonline.com/Products/Eclipse/JSEclipse/Features/Details/Use+of+JSDoc+and+inline+parameter+comments+to+detect+parameter+type.html?id_ftr=639 Eclipse IDE] has extensions that understand the JSDoc syntax.
* The open source project [http://openlayers.org/~crschmidt/openlayers-jsdoc/ OpenLayers] uses JSDoc.
* [http://mozile.mozdev.org/0.8/doc/jsdoc/index.html Mozile] , the Mozilla Inline Editor uses JSDoc.
* The [http://helma.zumbrunn.net/reference/core/ Helma] application framework uses JSDoc.See also
*
Comparison of documentation generators External links
* [http://www.scriptdoc.org/specification.htm ScriptDoc]
Documentation generators
* [http://jsdoc.sourceforge.net/ JSDoc] - written in Perl
* [http://jsdoctoolkit.org/ JsDoc Toolkit] - written in JavaScript
Wikimedia Foundation. 2010.