Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

SyntaxError.prototype

현재 번역은 완벽하지 않습니다. 한국어로 문서 번역에 동참해주세요.

SyntaxError.prototype 속성은 SyntaxError 객체의 생성자 프로토타입을 표현합니다.

설명

모든 SyntaxError 인스턴스는 SyntaxError.prototype 객체로부터 상속 받습니다. 또한, 속성이나 메소드를 추가할 때 모든 인스턴스에 프로토타입을 사용 할 수 있습니다.

속성

SyntaxError.prototype.constructor
인스턴스의 프로토타입을 생성하는 함수를 명시합니다.
SyntaxError.prototype.message
에러 메시지. 비록 ECMA-262는  SyntaxError 가 고유의 message 속성을 제공해야 한다고 명시하고 있지만, SpiderMonkey 에서는, Error.prototype.message를 상속 받습니다. 
SyntaxError.prototype.name
에러명. Error로부터 상속 받습니다.
SyntaxError.prototype.fileName
에러를 발생시킨 파일의 경로. Error로부터 상속 받습니다.
SyntaxError.prototype.lineNumber
에러가 발생한 파일의 코드 라인 넘버. Error로부터 상속 받습니다.
SyntaxError.prototype.columnNumber
에러가 발생된 라인의 컬럼 넘버. Error로부터 상속 받습니다.
SyntaxError.prototype.stack
스택 트레이스. Error로부터 상속 받습니다.

메소드

비록 SyntaxError 프로토타입 객체는 고유의 메소드를 가지고 있지는 않지만, SyntaxError 인스턴스는 몇 가지의 메소드를 프로토타입 체인을 통하여 상속 받습니다.

스펙

Specification Status Comment
ECMAScript 3rd Edition (ECMA-262) Standard 초기 정의.
ECMAScript 5.1 (ECMA-262)
The definition of 'NativeError.prototype' in that specification.
Standard NativeError.prototype로 정의.
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'NativeError.prototype' in that specification.
Standard NativeError.prototype로 정의.
ECMAScript 2017 Draft (ECMA-262)
The definition of 'NativeError.prototype' in that specification.
Draft NativeError.prototype로 정의.

브라우저 호환성

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) (Yes) (Yes) (Yes) (Yes)
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)

참조

문서 태그 및 공헌자

 이 페이지의 공헌자: magnoliaa
 최종 변경: magnoliaa,