My favorites | Sign in
Project Logo
                
Search
for
Updated Sep 28, 2008 by micmath
TagConstructor  
@constructor

The @constructor Tag

The @constructor tag marks an function as being a constructor, meant to be called with the new keyword to return an instance.

Syntax

@constructor

Examples

/**
    Creates a new Person.
    @constructor 
*/ 
Person = function() {
}

var p = new Person();

See Also

  • The @class tag can also be used to mark a function as being a constructor.
  • The @constructs tag can be used in combination with the @lends tag.
Hosted by Google Code