From 6e9fe98036090a37cc6247b873845505e5b512fb Mon Sep 17 00:00:00 2001 From: Tanner Dolby Date: Tue, 22 Feb 2022 01:49:36 -0800 Subject: Removes empty
or

elements from pages (#3093) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Removes all empty paragraph elements * Removes all empty div elements * Preserve empty div in code snippet * Preserve empty elements inside code snippets * Remove fr files which were converted into markdown * Web/CSS/transform-function/scaleX()/index.html The file is already renamed to index.md。 * remove not needed file * Resolve remaining conflict Co-authored-by: julieng Co-authored-by: Masahiro FUJIMOTO --- .../javascript/reference/global_objects/promise/resolve/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/promise/resolve/index.html') diff --git a/files/zh-cn/web/javascript/reference/global_objects/promise/resolve/index.html b/files/zh-cn/web/javascript/reference/global_objects/promise/resolve/index.html index 4e50535f20..665c71f1f1 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/promise/resolve/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/promise/resolve/index.html @@ -11,9 +11,9 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Promise/resolve

Promise.resolve(value)方法返回一个以给定值解析后的{{jsxref("Promise")}} 对象。如果这个值是一个 promise ,那么将返回这个 promise ;如果这个值是thenable(即带有{{jsxref("Promise.then", "\"then\" ")}}方法),返回的promise会“跟随”这个thenable的对象,采用它的最终状态;否则返回的promise将以此值完成。此函数将类promise对象的多层嵌套展平。
-
-
+ +

警告:不要在解析为自身的thenable 上调用Promise.resolve。这将导致无限递归,因为它试图展平无限嵌套的promise。一个例子是将它与Angular中的异步管道一起使用。在此处了解更多信息。

-- cgit v1.2.3-54-g00ecf