An expression called the constructor method of a class directly.
-
- or -
An expression called the getter or setter method of a property directly.
-
Neither method can be called directly.
To correct this error
-
Do not call the constructor method.
- or -
-
Access the property using the "." syntax.
See Also
Reference
function get Statementfunction set Statement
Concepts
Other Resources
JScript ReferenceClass-based Objects