From a02f4b2f60c81e09b318a090e5c9c2d2d641c878 Mon Sep 17 00:00:00 2001 From: t7yang Date: Sat, 17 Jul 2021 16:10:02 +0800 Subject: replace wiki links in zh-CN --- files/zh-cn/web/api/window/beforeunload_event/index.html | 2 +- files/zh-cn/web/api/window/devicepixelratio/index.html | 6 +++--- files/zh-cn/web/api/window/getselection/index.html | 2 +- files/zh-cn/web/api/window/requestidlecallback/index.html | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'files/zh-cn/web/api/window') diff --git a/files/zh-cn/web/api/window/beforeunload_event/index.html b/files/zh-cn/web/api/window/beforeunload_event/index.html index f582257cb1..08deab442d 100644 --- a/files/zh-cn/web/api/window/beforeunload_event/index.html +++ b/files/zh-cn/web/api/window/beforeunload_event/index.html @@ -50,7 +50,7 @@ original_slug: Web/Events/beforeunload

为避免意外弹出窗口,除非页面已与之交互,否则浏览器可能不会显示在beforeunload事件中创建的提示,甚至根本不会显示它们。

-

将事件处理程序/监听器加到window或 documentbeforeunload事件后,将阻止浏览器使用内存中的页面导航缓存,例如Firefox的Back-Forward缓存WebKit的Page Cache

+

将事件处理程序/监听器加到window或 documentbeforeunload事件后,将阻止浏览器使用内存中的页面导航缓存,例如Firefox的Back-Forward缓存WebKit的Page Cache

HTML规范指出在此事件中调用{{domxref("window.alert()")}},{{domxref("window.confirm()")}}以及{{domxref("window.prompt()")}}方法,可能会失效。更多详细信息,请参见HTML规范

diff --git a/files/zh-cn/web/api/window/devicepixelratio/index.html b/files/zh-cn/web/api/window/devicepixelratio/index.html index a5976667d9..aba68dcdf8 100644 --- a/files/zh-cn/web/api/window/devicepixelratio/index.html +++ b/files/zh-cn/web/api/window/devicepixelratio/index.html @@ -172,8 +172,8 @@ matchMedia(mqString).addListener(updatePixelRatio);

参见

diff --git a/files/zh-cn/web/api/window/getselection/index.html b/files/zh-cn/web/api/window/getselection/index.html index 825ee1787d..fcaf9bf733 100644 --- a/files/zh-cn/web/api/window/getselection/index.html +++ b/files/zh-cn/web/api/window/getselection/index.html @@ -48,7 +48,7 @@ translation_of: Web/API/Window/getSelection

值得注意的是,目前在Firefox, Edge (非 Chromium 版本) 及 Internet Explorer 中,getSelection() 对 {{htmlelement("textarea")}} 及 {{htmlelement("input")}} 元素不起作用。 {{domxref("HTMLInputElement.setSelectionRange()")}} 或 selectionStart 及 selectionEnd 属性可用于解决此问题。

-

还要注意选择不同于焦点(详见 Selection 及输入焦点)。可使用{{domxref("Document.activeElement")}} 来返回当前的焦点元素.

+

还要注意选择不同于焦点(详见 Selection 及输入焦点)。可使用{{domxref("Document.activeElement")}} 来返回当前的焦点元素.

浏览器兼容性

diff --git a/files/zh-cn/web/api/window/requestidlecallback/index.html b/files/zh-cn/web/api/window/requestidlecallback/index.html index dc36051a1f..0632e3a3ce 100644 --- a/files/zh-cn/web/api/window/requestidlecallback/index.html +++ b/files/zh-cn/web/api/window/requestidlecallback/index.html @@ -42,7 +42,7 @@ translation_of: Web/API/Window/requestIdleCallback

Example

-

See our complete example in the article Cooperative Scheduling of Background Tasks API.

+

See our complete example in the article Cooperative Scheduling of Background Tasks API.

规范

-- cgit v1.2.3-54-g00ecf