From 8824afb494e5398bc0efcf5f7eb78782096fc90c Mon Sep 17 00:00:00 2001 From: A1lo Date: Fri, 18 Mar 2022 21:53:46 +0800 Subject: Replace marco `anch` with `` tag for `zh-CN` (#4668) * replace anch with tag `` * auto replace anch with scripts * fix: resolve some incorrect anchors * replace anch with markdown link in markdown files * sync with english version for `Properties` * fix: resolve some incorrect anchors * using `Specifications` marco to replace `` * fix: resolve some incorrect anchors * remove the `noteCard` and add a `h2` head * fix: resolve some incorrect anchors * remove the duplicated content * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors * revert the content change and replace anch * revert the content change and replace anch * revert the content chang * fix: correct the `href` * revert content changes and replace the anch * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors --- files/zh-cn/web/api/clipboard/index.html | 2 +- files/zh-cn/web/api/clipboard/read/index.html | 2 +- files/zh-cn/web/api/clipboard/write/index.html | 2 +- files/zh-cn/web/api/clipboard/writetext/index.html | 4 +--- 4 files changed, 4 insertions(+), 6 deletions(-) (limited to 'files/zh-cn/web/api/clipboard') diff --git a/files/zh-cn/web/api/clipboard/index.html b/files/zh-cn/web/api/clipboard/index.html index 834376f01e..05e3313323 100644 --- a/files/zh-cn/web/api/clipboard/index.html +++ b/files/zh-cn/web/api/clipboard/index.html @@ -23,7 +23,7 @@ translation_of: Web/API/Clipboard

如果用户没有适时使用 Permissions API 授予相应权限和"clipboard-read" 或 "clipboard-write" 权限,调用 Clipboard 对象的方法不会成功。

-

注意:实际上,现在浏览器对于访问剪贴板权限的索取各有不同,在章节 {{anch("剪贴板可用性")}} 查看更多细节。

+

注意:实际上,现在浏览器对于访问剪贴板权限的索取各有不同,在章节 剪贴板可用性 查看更多细节。

所有剪贴板 API 方法都是异步的;它们返回一个 {{jsxref("Promise")}} 对象,在剪贴板访问完成后被执行。如果剪贴板访问被拒绝,promise 也会被拒绝。

diff --git a/files/zh-cn/web/api/clipboard/read/index.html b/files/zh-cn/web/api/clipboard/read/index.html index 7b0ffa7bda..4fa5d071e2 100644 --- a/files/zh-cn/web/api/clipboard/read/index.html +++ b/files/zh-cn/web/api/clipboard/read/index.html @@ -16,7 +16,7 @@ translation_of: Web/API/Clipboard/read

To read from the clipboard, you must first have the "clipboard-read" permission.

-

Note: The asynchronous Clipboard and Permissions APIs are still in the process of being integrated into most browsers, so they often deviate from the official rules for permissions and the like. Be sure to review the {{anch("Browser compatibility", "compatibility table")}} before using these methods.

+

Note: The asynchronous Clipboard and Permissions APIs are still in the process of being integrated into most browsers, so they often deviate from the official rules for permissions and the like. Be sure to review the compatibility table before using these methods.

语法

diff --git a/files/zh-cn/web/api/clipboard/write/index.html b/files/zh-cn/web/api/clipboard/write/index.html index a7f69da118..ef3cf82beb 100644 --- a/files/zh-cn/web/api/clipboard/write/index.html +++ b/files/zh-cn/web/api/clipboard/write/index.html @@ -16,7 +16,7 @@ translation_of: Web/API/Clipboard/write

但是你要提前获取 "Permissions API" 的 "clipboard-write" 权限才能将数据写入到剪贴板。

-

注意: 浏览器对这个异步剪贴板的 API 仍然在讨论中。所以在使用它之前请检查 {{anch("Browser compatibility", "compatibility table")}} 和 {{SectionOnPage("/en-US/docs/Web/API/Clipboard", "Clipboard availability")}} 以获得更多的兼容性信息。

+

注意: 浏览器对这个异步剪贴板的 API 仍然在讨论中。所以在使用它之前请检查 浏览器兼容性 和 {{SectionOnPage("/en-US/docs/Web/API/Clipboard", "Clipboard availability")}} 以获得更多的兼容性信息。

语法

diff --git a/files/zh-cn/web/api/clipboard/writetext/index.html b/files/zh-cn/web/api/clipboard/writetext/index.html index e60e7204fe..2b6d77f43d 100644 --- a/files/zh-cn/web/api/clipboard/writetext/index.html +++ b/files/zh-cn/web/api/clipboard/writetext/index.html @@ -14,7 +14,7 @@ translation_of: Web/API/Clipboard/writeText

{{domxref("Clipboard")}} 接口的 writeText() 方法可以写入特定字符串到操作系统的剪切板。

-

Note: 规范要求在写入剪贴板之前使用 Permissions API 获取“剪贴板写入”权限。但是,不同浏览器的具体要求不同,因为这是一个新的API。有关详细信息,请查看{{anch("Browser compatibility", "compatibility table")}} and {{SectionOnPage("/en-US/docs/Web/API/Clipboard", "Clipboard availability")}}。

+

Note: 规范要求在写入剪贴板之前使用 Permissions API 获取“剪贴板写入”权限。但是,不同浏览器的具体要求不同,因为这是一个新的API。有关详细信息,请查看浏览器兼容性 and {{SectionOnPage("/en-US/docs/Web/API/Clipboard", "Clipboard availability")}}。

语法

@@ -63,6 +63,4 @@ translation_of: Web/API/Clipboard/writeText

浏览器兼容性

- -

{{Compat("api.Clipboard.writeText")}}

-- cgit v1.2.3-54-g00ecf