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.

Promise.prototype

Promise.prototype 속성은 Promise 생성자의 프로토타입을 나타냅니다.

Property attributes of Promise.prototype
Writable no
Enumerable no
Configurable no

설명

Promise 인스턴스는 Promise.prototype에서 상속합니다. 모든 Promise 인스턴스에 속성 또는 메서드를 추가하기 위해 생성자의 프로토타입 객체를 사용할 수 있습니다.

속성

Promise.prototype.constructor
인스턴스의 프로토타입을 만드는 함수를 반환합니다. 이는 기본으로 Promise 함수입니다.

메서드

Promise.prototype.catch(onRejected)
프로미스(promise)에 거부 처리기 콜백을 추가하고 호출된 경우 콜백의 반환값 또는 프로미스가 대신 이행된 경우 그 원래 이행(fulfillment)값으로 결정하는(resolving) 새 프로미스를 반환합니다.
Promise.prototype.then(onFulfilled, onRejected)
프로미스에 이행 또는 거부 처리기를 추가하고 호출된 처리기의 반환값 또는 프로미스가 처리되지 않은 경우 그 원래 처리된(settled) 값으로 결정하는 새 프로미스를 반환합니다 (즉 관련 처리기 onFulfilled 또는 onRejectedundefined인 경우).

스펙

스펙 상태 설명
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'Promise.prototype' in that specification.
Standard 초기 정의.
ECMAScript 2017 Draft (ECMA-262)
The definition of 'Promise.prototype' in that specification.
Draft  

브라우저 호환성

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 32 29.0 (29.0) No support 19 7.1
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support No support 29.0 (29.0) No support No support 8 32

참조

문서 태그 및 공헌자

태그: 
 이 페이지의 공헌자: Netaras
 최종 변경: Netaras,