From 43a5cac2eff22c21071800e13bef12af9d3a37d0 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 13:12:08 +0100 Subject: unslug zh-tw: move --- .../global_objects/promise/prototype/index.html | 65 ---------------------- 1 file changed, 65 deletions(-) delete mode 100644 files/zh-tw/web/javascript/reference/global_objects/promise/prototype/index.html (limited to 'files/zh-tw/web/javascript/reference/global_objects/promise') diff --git a/files/zh-tw/web/javascript/reference/global_objects/promise/prototype/index.html b/files/zh-tw/web/javascript/reference/global_objects/promise/prototype/index.html deleted file mode 100644 index f93572bea3..0000000000 --- a/files/zh-tw/web/javascript/reference/global_objects/promise/prototype/index.html +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: Promise.prototype -slug: Web/JavaScript/Reference/Global_Objects/Promise/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/Promise -translation_of_original: Web/JavaScript/Reference/Global_Objects/Promise/prototype ---- -
{{JSRef}}
- -

Promise.prototype 屬性代表了 {{jsxref("Promise")}} 建構式的原型物件。

- -
{{js_property_attributes(0,0,0)}}
- -

描述

- -

所有 {{jsxref("Promise")}} 實例都繼承自 {{jsxref("Promise.prototype")}}。您可以使用建構式的原型物件來增加屬性或方法到所有的 Promise 實例。

- -

屬性

- -
-
Promise.prototype.constructor
-
回傳一個建立實例原型(instance's prototype)的函式。預設為 {{jsxref("Promise")}} 函數。
-
- -

方法

- -
-
{{jsxref("Promise.catch", "Promise.prototype.catch(onRejected)")}}
-
繫結一個拒絕回呼函式(rejection handler callback)到 promise,當它被呼叫時回傳一個以回傳值作解析的新 promise,或者當 promise 被實現時以原值作解析。
-
{{jsxref("Promise.then", "Promise.prototype.then(onFulfilled, onRejected)")}}
-
繫結實現或拒絕回呼函式到 promise,回傳一個以 handler 之回傳值作解析的新 promise,或者當 promise 未處理(not handled)時以原值作解析。(i.e. 比如相關聯的 onFulfilled 或 onRejected 不是函式。)
-
- -

規範

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('ES6', '#sec-promise.prototype', 'Promise.prototype')}}{{Spec2('ES6')}}Initial definition.
{{SpecName('ESDraft', '#sec-promise.prototype', 'Promise.prototype')}}{{Spec2('ESDraft')}} 
- -

瀏覽器相容性

- - - -

{{Compat("javascript/promise","Promise.prototype")}}

- -

參見

- - -- cgit v1.2.3-54-g00ecf