prototype

Table of contents

  1. 1. Summary
  2. 2. Description
  3. 3. Properties
  4. 4. Methods
    1. 4.1. See also
Table of contents
  1. 1. Summary
  2. 2. Description
  3. 3. Properties
  4. 4. Methods
    1. 4.1. See also

Summary

Represents the prototype for the SyntaxError constructor.

Description

All SyntaxError instances inherit from SyntaxError.prototype. You can use the prototype to add properties or methods to all instances.

Properties

constructor
Specifies the function that created an instance's prototype.
name
Error name.
Note: Although ECMA-262  specifies that SyntaxError should provide its own message property, in SpiderMonkey, it inherits Error.prototype.message.

Properties inherited from Error.prototype
fileName, lineNumber, message, name, number, stack

Methods

Although the SyntaxError prototype object does not contain any methods of its own, SyntaxError instances do inherit some methods through the prototype chain.

Methods inherited from Error.prototype
toSource, toString

Tags (0)

Edit tags
  • No tags

Attachments (0)

 

Attach file