newInstance
can.Construct.newInstance
Returns an instance of can.Construct
. This method can be overridden to return a cached instance.
Returns an instance of can.Construct
. This method can be overridden to return a cached instance.
Creates a new instance of the constructor function. This method is useful for creating new instances with arbitrary parameters. Typically, however, you will simply want to call the constructor with the new operator.
Example
The following creates a
Person
Construct and then creates a new instance of Person, usingapply
on newInstance to pass arbitrary parameters.