Jetpack/SDK/Writing Documentation: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 58: Line 58:


If a class doesn't have any objects of a given category (for example, no properties) then that category is omitted.
If a class doesn't have any objects of a given category (for example, no properties) then that category is omitted.
=== Documenting API elements ===
Every atomic API element (each constructor, function, method, property, event) is an H4. It's styled as [CODE] and given the special class "addon-sdk-api-name".
==== Constructors ====
Constructors are documented like this:
* [H4 class="addon-sdk-api-name"][CODE] Name(parameters)
* Overview text
* [H5]Parameters
* [STRONG]parameterName : parameterType
* [TABLE]mandatory options
* [TABLE]optional options
First there's the title, which is an H4 with the special class "addon-sdk-api-name", styled as code.
Then there's some general overview text.
Then we document parameters under an H5 heading called "Parameters". Each parameter is documented like paramName : paramType
The title is the name of the constructor including any parameters: PageMod(options). That's followed
canmove, Confirmed users
737

edits

Navigation menu