@add

  • constructor
documentjs.tags.add  

Sets a docObject as the current scope.

@add NAME

Parameters

  1. NAME {STRING}

    The name of docObject to set as the scope.

Use

@function or @property tags created without a name, or with a "short name" will use the current scope to guess their full name and parent. @add can set the scope, allowing comments to not have to write out a full name and @parent tag.

In the following example, a docObject named lib.Component.prototype.plugin and lib.Component.prototype.draw will be created, each with lib.Component.prototype as their parent.

/** @add lib.Component.prototype */
lib.extend(lib.Component.prototype,{
  /**
   * A plugin method on [lib.Component]
   */
  plugin: function(){},
  /**
   * @property draw
   * A plugin method on [lib.Component]
   */
  draw: {}
})