My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
TagConstructor  
@constructor
Updated Aug 4, 2011 by micm...@gmail.com

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.
Powered by Google Project Hosting