blob: 10ee3d4f58fe7f72a405db71e42b2a4aaea62a8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
---
title: Promise.prototype
slug: conflicting/Web/JavaScript/Reference/Global_Objects/Promise
tags:
- JavaScript
- Promise
- Property
- Reference
translation_of: Web/JavaScript/Reference/Global_Objects/Promise
translation_of_original: Web/JavaScript/Reference/Global_Objects/Promise/prototype
original_slug: Web/JavaScript/Reference/Global_Objects/Promise/prototype
---
<div>{{JSRef}}</div>
<p><strong><code>Promise.prototype</code></strong> 속성은 {{jsxref("Promise")}} 생성자의 프로토타입을 나타냅니다.</p>
<div>{{js_property_attributes(0,0,0)}}</div>
<h2 id="설명">설명</h2>
<p>{{jsxref("Promise")}} 인스턴스는 {{jsxref("Promise.prototype")}}을 상속합니다. 모든 <code>Promise</code> 인스턴스에 속성 또는 메서드를 추가하기 위해 생성자의 프로토타입 객체를 사용할 수 있습니다.</p>
<h2 id="속성">속성</h2>
<dl>
<dt><code>Promise.prototype.constructor</code></dt>
<dd>인스턴스의 프로토타입을 만드는 함수를 반환합니다. 기본값은 {{jsxref("Promise")}} 함수입니다.</dd>
</dl>
<h2 id="메서드">메서드</h2>
<dl>
<dt>{{jsxref("Promise.prototype.catch()")}}</dt>
<dd>프로미스(promise)에 거부 처리기 콜백을 추가하고 호출된 경우 콜백의 반환값 또는 프로미스가 대신 이행된 경우 그 원래 이행(fulfillment)값으로 결정하는(resolving) 새 프로미스를 반환합니다.</dd>
<dt>{{jsxref("Promise.prototype.then()")}}</dt>
<dd>프로미스에 이행 또는 거부 처리기를 추가하고 호출된 처리기의 반환값 또는 프로미스가 처리되지 않은 경우 그 원래 처리된(settled) 값으로 결정하는 새 프로미스를 반환합니다 (즉 관련 처리기 <code>onFulfilled</code> 또는 <code>onRejected</code>가 <code>undefined</code>인 경우).</dd>
<dt>{{jsxref("Promise.prototype.finally()")}}</dt>
<dd>Appends a handler to the promise, and returns a new promise which is resolved when the original promise is resolved. The handler is called when the promise is settled, whether fulfilled or rejected.</dd>
</dl>
<h2 id="명세">명세</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">명세</th>
<th scope="col">상태</th>
<th scope="col">설명</th>
</tr>
<tr>
<td>{{SpecName('ES6', '#sec-promise.prototype', 'Promise.prototype')}}</td>
<td>{{Spec2('ES6')}}</td>
<td>초기 정의.</td>
</tr>
<tr>
<td>{{SpecName('ESDraft', '#sec-promise.prototype', 'Promise.prototype')}}</td>
<td>{{Spec2('ESDraft')}}</td>
<td> </td>
</tr>
</tbody>
</table>
<h2 id="브라우저_호환성">브라우저 호환성</h2>
<p>{{Compat("javascript.builtins.Promise.prototype")}}</p>
<h2 id="같이_보기">같이 보기</h2>
<ul>
<li>{{jsxref("Promise")}}</li>
</ul>
|