|
TagMemberOf
@memberOf
The @memberOf TagThe @memberOf tag allows you to document what you consider the "parent" or container of an object to be. Syntax@memberOf parentNamepath
Examplevar Tools = {};
/** @namespace */
Tools.Dom = {};
/** @memberOf Tools.Dom */
var hiliteSearchTerm = function(term) {
}
Tools.Dom.highlightSearchTerm = hiliteSearchTerm;Without the @memberOf tag, the hiliteSearchTerm function would be documented as a global function. That's because, in fact, it is a global function, but it is also a member of the Tools.Dom namespace as well, and that's how you wish to document it. NoteBy default, as in the above example, the member is documented as static. If you want to document a member as belonging to an instance, or to the prototype, adjust the namespace like so: @memberOf Tools.Dom# or @memberOf Tools.Dom.prototype In AdditionThere are two tags that act as if they are combined with @memberOf:
See Also
|