JSDoc

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, like HTML or RTF.

JSDoc tags

:

Example

An example of using JSDoc to document a constructor.

/** * Create an instance of Circle. * * @constructor * @param {number} r The desired radius of the circle. */ function Circle(r) { }

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.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • JSDoc — JSDoc  генератор документации в HTML формате из комментариев исходного кода на JavaScript. Синтаксис JSDoc похож на синтаксис Javadoc, который используется для документирования Java кода, но предназначен для работы с языком JavaScript,… …   Википедия

  • JSDoc — es una sintaxis para agregar documentación de la API al código fuente de JavaScript. La sintaxis JSDoc es similar a la sintaxis de Javadoc, usado para documentar el código de Java, pero se ha especializado para trabajar con la sintaxis de… …   Wikipedia Español

  • Comparison of documentation generators — The following tables compare general and technical information for a number of documentation generators. Please see the individual products articles for further information. This article is not all inclusive or necessarily up to date. Unless… …   Wikipedia

  • Anexo:Comparativa de generadores de documentación — Las siguientes tablas comparan información general y técnica de un número de generadores de documentación. Por favor, consulte la página individual de cada producto para obtener información adicional. Este artículo no incluye todos los… …   Wikipedia Español

  • JavaScript — Не следует путать с Java. JavaScript Класс языка: мультипарадигменный …   Википедия

  • Dynamic HTML — HTML HTML and HTML5 Dynamic HTML XHTML XHTML Mobile Profile and C HTML Canvas element Character encodings Document Object Model Font family HTML editor HTML element HTML Frames HTML5 video …   Wikipedia

  • JavaScript — Infobox programming language name = JavaScript paradigm = Multi paradigm: prototype based, functional, imperative, scripting year = 1995 designer = Brendan Eich developer = Netscape Communications Corporation, Mozilla Foundation latest release… …   Wikipedia

  • JScript — Appeared in 1996 Developer Microsoft Stable release 9.0 (March 2011) Typing discipline dynamic, weak, duck Major implementations W …   Wikipedia

  • Rhino (JavaScript engine) — Rhino Developer(s) Mozilla Foundation / Mozilla Corporation Stable release 1.7R3 / May 9, 2011; 6 months ago ( …   Wikipedia

  • Presto (layout engine) — Presto Developer(s) Opera Software ASA Stable release 2.9.168 / 28 June 2011; 4 months ago ( …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”