From 6acf87987baea4675dbd1d5586663959e742cc03 Mon Sep 17 00:00:00 2001 From: MDN Date: Tue, 22 Feb 2022 00:12:14 +0000 Subject: [CRON] sync translated content --- files/zh-cn/_redirects.txt | 17 ++-- files/zh-cn/_wikihistory.json | 52 +++++------ .../api/baseaudiocontext/onstatechange/index.html | 102 --------------------- .../baseaudiocontext/statechange_event/index.html | 102 +++++++++++++++++++++ .../document/afterscriptexecute_event/index.html | 45 +++++++++ .../document/beforescriptexecute_event/index.html | 45 +++++++++ .../api/document/onafterscriptexecute/index.html | 45 --------- .../api/document/onbeforescriptexecute/index.html | 44 --------- 8 files changed, 228 insertions(+), 224 deletions(-) delete mode 100644 files/zh-cn/web/api/baseaudiocontext/onstatechange/index.html create mode 100644 files/zh-cn/web/api/baseaudiocontext/statechange_event/index.html create mode 100644 files/zh-cn/web/api/document/afterscriptexecute_event/index.html create mode 100644 files/zh-cn/web/api/document/beforescriptexecute_event/index.html delete mode 100644 files/zh-cn/web/api/document/onafterscriptexecute/index.html delete mode 100644 files/zh-cn/web/api/document/onbeforescriptexecute/index.html (limited to 'files/zh-cn') diff --git a/files/zh-cn/_redirects.txt b/files/zh-cn/_redirects.txt index 8a5afc908c..e4ba07b3fc 100644 --- a/files/zh-cn/_redirects.txt +++ b/files/zh-cn/_redirects.txt @@ -382,8 +382,8 @@ /zh-CN/docs/DOM/element.insertAdjacentHTML /zh-CN/docs/Web/API/Element/insertAdjacentHTML /zh-CN/docs/DOM/element.isContentEditable /zh-CN/docs/Web/API/HTMLElement/isContentEditable /zh-CN/docs/DOM/element.mozmatchesselector /zh-CN/docs/Web/API/Element/matches -/zh-CN/docs/DOM/element.onafterscriptexecute /zh-CN/docs/Web/API/Document/onafterscriptexecute -/zh-CN/docs/DOM/element.onbeforescriptexecute /zh-CN/docs/Web/API/Document/onbeforescriptexecute +/zh-CN/docs/DOM/element.onafterscriptexecute /zh-CN/docs/Web/API/Document/afterscriptexecute_event +/zh-CN/docs/DOM/element.onbeforescriptexecute /zh-CN/docs/Web/API/Document/beforescriptexecute_event /zh-CN/docs/DOM/element.onblur /zh-CN/docs/Web/API/GlobalEventHandlers/onblur /zh-CN/docs/DOM/element.onchange /zh-CN/docs/Web/API/GlobalEventHandlers/onchange /zh-CN/docs/DOM/element.oncopy /zh-CN/docs/Web/API/HTMLElement/oncopy @@ -1233,10 +1233,11 @@ /zh-CN/docs/Web/API/AudioContext/decodeAudioData /zh-CN/docs/Web/API/BaseAudioContext/decodeAudioData /zh-CN/docs/Web/API/AudioContext/destination /zh-CN/docs/Web/API/BaseAudioContext/destination /zh-CN/docs/Web/API/AudioContext/listener /zh-CN/docs/Web/API/BaseAudioContext/listener -/zh-CN/docs/Web/API/AudioContext/onstatechange /zh-CN/docs/Web/API/BaseAudioContext/onstatechange +/zh-CN/docs/Web/API/AudioContext/onstatechange /zh-CN/docs/Web/API/BaseAudioContext/statechange_event /zh-CN/docs/Web/API/AudioContext/sampleRate /zh-CN/docs/Web/API/BaseAudioContext/sampleRate /zh-CN/docs/Web/API/AudioContext/state /zh-CN/docs/Web/API/BaseAudioContext/state /zh-CN/docs/Web/API/AudioNodeOptions /zh-CN/docs/conflicting/Web/API/AudioNode +/zh-CN/docs/Web/API/BaseAudioContext/onstatechange /zh-CN/docs/Web/API/BaseAudioContext/statechange_event /zh-CN/docs/Web/API/Blob.size /zh-CN/docs/Web/API/Blob/size /zh-CN/docs/Web/API/Blob.slice /zh-CN/docs/Web/API/Blob/slice /zh-CN/docs/Web/API/Blob.type /zh-CN/docs/Web/API/Blob/type @@ -1267,6 +1268,8 @@ /zh-CN/docs/Web/API/Document/mozFullScreen /zh-CN/docs/Web/API/Document/fullscreen /zh-CN/docs/Web/API/Document/mozFullScreenElement /zh-CN/docs/Web/API/Document/fullscreenElement /zh-CN/docs/Web/API/Document/mozFullScreenEnabled /zh-CN/docs/Web/API/Document/fullscreenEnabled +/zh-CN/docs/Web/API/Document/onafterscriptexecute /zh-CN/docs/Web/API/Document/afterscriptexecute_event +/zh-CN/docs/Web/API/Document/onbeforescriptexecute /zh-CN/docs/Web/API/Document/beforescriptexecute_event /zh-CN/docs/Web/API/Document/onfullscreenchange /zh-CN/docs/conflicting/Web/API/Document/fullscreenchange_event /zh-CN/docs/Web/API/Document/onfullscreenerror /zh-CN/docs/Web/API/Document/fullscreenerror_event /zh-CN/docs/Web/API/Document/onreadystatechange /en-US/docs/Web/API/Document/readystatechange_event @@ -1297,8 +1300,8 @@ /zh-CN/docs/Web/API/Element.innerHTML /zh-CN/docs/Web/API/Element/innerHTML /zh-CN/docs/Web/API/Element.insertAdjacentHTML /zh-CN/docs/Web/API/Element/insertAdjacentHTML /zh-CN/docs/Web/API/Element.matches /zh-CN/docs/Web/API/Element/matches -/zh-CN/docs/Web/API/Element.onafterscriptexecute /zh-CN/docs/Web/API/Document/onafterscriptexecute -/zh-CN/docs/Web/API/Element.onbeforescriptexecute /zh-CN/docs/Web/API/Document/onbeforescriptexecute +/zh-CN/docs/Web/API/Element.onafterscriptexecute /zh-CN/docs/Web/API/Document/afterscriptexecute_event +/zh-CN/docs/Web/API/Element.onbeforescriptexecute /zh-CN/docs/Web/API/Document/beforescriptexecute_event /zh-CN/docs/Web/API/Element.oncopy /zh-CN/docs/Web/API/HTMLElement/oncopy /zh-CN/docs/Web/API/Element.oncut /zh-CN/docs/Web/API/HTMLElement/oncut /zh-CN/docs/Web/API/Element.onpaste /zh-CN/docs/Web/API/HTMLElement/onpaste @@ -1313,8 +1316,8 @@ /zh-CN/docs/Web/API/Element/Activate_event /zh-CN/docs/Web/API/Element/DOMActivate_event /zh-CN/docs/Web/API/Element/accessKey /zh-CN/docs/Web/API/HTMLElement/accessKey /zh-CN/docs/Web/API/Element/addEventListener /zh-CN/docs/Web/API/EventTarget/addEventListener -/zh-CN/docs/Web/API/Element/onafterscriptexecute /zh-CN/docs/Web/API/Document/onafterscriptexecute -/zh-CN/docs/Web/API/Element/onbeforescriptexecute /zh-CN/docs/Web/API/Document/onbeforescriptexecute +/zh-CN/docs/Web/API/Element/onafterscriptexecute /zh-CN/docs/Web/API/Document/afterscriptexecute_event +/zh-CN/docs/Web/API/Element/onbeforescriptexecute /zh-CN/docs/Web/API/Document/beforescriptexecute_event /zh-CN/docs/Web/API/Element/oncopy /zh-CN/docs/Web/API/HTMLElement/oncopy /zh-CN/docs/Web/API/Element/oncut /zh-CN/docs/Web/API/HTMLElement/oncut /zh-CN/docs/Web/API/Element/onfullscreenchange /zh-CN/docs/Web/API/Element/fullscreenchange_event diff --git a/files/zh-cn/_wikihistory.json b/files/zh-cn/_wikihistory.json index 12e197d50b..db475bbc4d 100644 --- a/files/zh-cn/_wikihistory.json +++ b/files/zh-cn/_wikihistory.json @@ -7997,12 +7997,6 @@ "ayqy" ] }, - "Web/API/BaseAudioContext/onstatechange": { - "modified": "2019-03-23T22:52:09.265Z", - "contributors": [ - "ayqy" - ] - }, "Web/API/BaseAudioContext/sampleRate": { "modified": "2019-03-23T22:52:21.186Z", "contributors": [ @@ -8015,6 +8009,12 @@ "ayqy" ] }, + "Web/API/BaseAudioContext/statechange_event": { + "modified": "2019-03-23T22:52:09.265Z", + "contributors": [ + "ayqy" + ] + }, "Web/API/BatteryManager": { "modified": "2019-03-23T22:45:03.959Z", "contributors": [ @@ -10553,6 +10553,16 @@ "caoruiy" ] }, + "Web/API/Document/afterscriptexecute_event": { + "modified": "2019-03-24T00:15:00.171Z", + "contributors": [ + "wbamberg", + "teoli", + "khalid32", + "ziyunfei", + "zhangyaochun1987" + ] + }, "Web/API/Document/alinkColor": { "modified": "2019-03-18T20:59:01.745Z", "contributors": [ @@ -10588,6 +10598,16 @@ "ziyunfei" ] }, + "Web/API/Document/beforescriptexecute_event": { + "modified": "2019-03-24T00:14:56.790Z", + "contributors": [ + "wbamberg", + "ziyunfei", + "teoli", + "khalid32", + "zhangyaochun1987" + ] + }, "Web/API/Document/bgColor": { "modified": "2019-03-18T20:59:10.850Z", "contributors": [ @@ -11269,26 +11289,6 @@ "lxcyha" ] }, - "Web/API/Document/onafterscriptexecute": { - "modified": "2019-03-24T00:15:00.171Z", - "contributors": [ - "wbamberg", - "teoli", - "khalid32", - "ziyunfei", - "zhangyaochun1987" - ] - }, - "Web/API/Document/onbeforescriptexecute": { - "modified": "2019-03-24T00:14:56.790Z", - "contributors": [ - "wbamberg", - "ziyunfei", - "teoli", - "khalid32", - "zhangyaochun1987" - ] - }, "Web/API/Document/onoffline": { "modified": "2019-03-23T22:24:33.524Z", "contributors": [ diff --git a/files/zh-cn/web/api/baseaudiocontext/onstatechange/index.html b/files/zh-cn/web/api/baseaudiocontext/onstatechange/index.html deleted file mode 100644 index b2ee0a7463..0000000000 --- a/files/zh-cn/web/api/baseaudiocontext/onstatechange/index.html +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: AudioContext.onstatechange -slug: Web/API/BaseAudioContext/onstatechange -translation_of: Web/API/BaseAudioContext/onstatechange -original_slug: Web/API/AudioContext/onstatechange ---- -

{{ APIRef("Web Audio API") }}

- -
-

{{ domxref("AudioContext") }}的onstatechange属性定义了一个事件处理器函数,触发{{Event("statechange")}}会被调用,也就是说audio context的状态发生变化时会执行。

-
- -

语法

- -
var audioCtx = new AudioContext();
-audioCtx.onstatechange = function() { ... };
- -

例子

- -

下面这段代码是AudioContext states DEMO (直接运行)中的,其中onstatechange处理器会在每次当前{{domxref("state")}}发生变化时把它输出到控制台。

- -
audioCtx.onstatechange = function() {
-  console.log(audioCtx.state);
-}
-
- -

规范

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Web Audio API', '#widl-AudioContext-onstatechange', 'onstatechange')}}{{Spec2('Web Audio API')}} 
- -

浏览器兼容性

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatChrome(43.0)}}{{CompatGeckoDesktop(40.0)}} {{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)Firefox OSIE MobileOpera MobileSafari MobileChrome for Android
Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

另见

- - diff --git a/files/zh-cn/web/api/baseaudiocontext/statechange_event/index.html b/files/zh-cn/web/api/baseaudiocontext/statechange_event/index.html new file mode 100644 index 0000000000..88adcced3b --- /dev/null +++ b/files/zh-cn/web/api/baseaudiocontext/statechange_event/index.html @@ -0,0 +1,102 @@ +--- +title: AudioContext.onstatechange +slug: Web/API/BaseAudioContext/statechange_event +translation_of: Web/API/BaseAudioContext/onstatechange +original_slug: Web/API/BaseAudioContext/onstatechange +--- +

{{ APIRef("Web Audio API") }}

+ +
+

{{ domxref("AudioContext") }}的onstatechange属性定义了一个事件处理器函数,触发{{Event("statechange")}}会被调用,也就是说audio context的状态发生变化时会执行。

+
+ +

语法

+ +
var audioCtx = new AudioContext();
+audioCtx.onstatechange = function() { ... };
+ +

例子

+ +

下面这段代码是AudioContext states DEMO (直接运行)中的,其中onstatechange处理器会在每次当前{{domxref("state")}}发生变化时把它输出到控制台。

+ +
audioCtx.onstatechange = function() {
+  console.log(audioCtx.state);
+}
+
+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Web Audio API', '#widl-AudioContext-onstatechange', 'onstatechange')}}{{Spec2('Web Audio API')}} 
+ +

浏览器兼容性

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatChrome(43.0)}}{{CompatGeckoDesktop(40.0)}} {{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)Firefox OSIE MobileOpera MobileSafari MobileChrome for Android
Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

另见

+ + diff --git a/files/zh-cn/web/api/document/afterscriptexecute_event/index.html b/files/zh-cn/web/api/document/afterscriptexecute_event/index.html new file mode 100644 index 0000000000..ea939df105 --- /dev/null +++ b/files/zh-cn/web/api/document/afterscriptexecute_event/index.html @@ -0,0 +1,45 @@ +--- +title: element.onafterscriptexecute +slug: Web/API/Document/afterscriptexecute_event +tags: + - DOM + - onafterscriptexecute +translation_of: Web/API/Document/onafterscriptexecute +original_slug: Web/API/Document/onafterscriptexecute +--- +
{{ApiRef}}{{gecko_minversion_header("2")}}
+ +

概述

+ +

当HTML文档中的{{HTMLElement("script")}}标签内的代码执行完毕时触发该事件,如果这个script标签是用appendChild()等方法动态添加上去的,则不会触发该事件.

+ +

语法

+ +
document.onafterscriptexecute = funcRef;
+
+ +

afterscriptexecute事件触发时,funcRef函数就会被调用. 传入参数eventtarget属性指向触发该事件的那个script元素.

+ +

例子

+ +
function finished(e) {
+  logMessage("Finished script with ID: " + e.target.id);
+}
+
+document.addEventListener("afterscriptexecute", finished, true);
+
+ +

查看在线演示

+ +

规范

+ + + +

相关链接

+ + diff --git a/files/zh-cn/web/api/document/beforescriptexecute_event/index.html b/files/zh-cn/web/api/document/beforescriptexecute_event/index.html new file mode 100644 index 0000000000..1835407a01 --- /dev/null +++ b/files/zh-cn/web/api/document/beforescriptexecute_event/index.html @@ -0,0 +1,45 @@ +--- +title: element.onbeforescriptexecute +slug: Web/API/Document/beforescriptexecute_event +tags: + - DOM + - onbeforescriptexecute +translation_of: Web/API/Document/onbeforescriptexecute +original_slug: Web/API/Document/onbeforescriptexecute +--- +
{{ApiRef}}{{gecko_minversion_header("2")}}
+ +

概述

+ +

当HTML文档中的<script>标签内的代码将要执行时触发该事件,如果这个script标签是用appendChild()等方法动态添加上去的,则不会触发该事件.

+ +

语法

+ +
document.onbeforescriptexecute = funcRef;
+
+ +

beforescriptexecute事件触发时,funcRef函数就会被调用. 传入参数eventtarget属性指向触发该事件的那个script元素.

+ +

例子

+ +
function starting(e) {
+  logMessage("Starting script with ID: " + e.target.id);
+}
+
+document.addEventListener("beforescriptexecute", starting, true);
+
+ +

查看在线演示

+ +

规范

+ + + +

相关链接

+ + diff --git a/files/zh-cn/web/api/document/onafterscriptexecute/index.html b/files/zh-cn/web/api/document/onafterscriptexecute/index.html deleted file mode 100644 index 5e4454cc86..0000000000 --- a/files/zh-cn/web/api/document/onafterscriptexecute/index.html +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: element.onafterscriptexecute -slug: Web/API/Document/onafterscriptexecute -tags: - - DOM - - onafterscriptexecute -translation_of: Web/API/Document/onafterscriptexecute -original_slug: Web/API/Element/onafterscriptexecute ---- -
{{ApiRef}}{{gecko_minversion_header("2")}}
- -

概述

- -

当HTML文档中的{{HTMLElement("script")}}标签内的代码执行完毕时触发该事件,如果这个script标签是用appendChild()等方法动态添加上去的,则不会触发该事件.

- -

语法

- -
document.onafterscriptexecute = funcRef;
-
- -

afterscriptexecute事件触发时,funcRef函数就会被调用. 传入参数eventtarget属性指向触发该事件的那个script元素.

- -

例子

- -
function finished(e) {
-  logMessage("Finished script with ID: " + e.target.id);
-}
-
-document.addEventListener("afterscriptexecute", finished, true);
-
- -

查看在线演示

- -

规范

- - - -

相关链接

- - diff --git a/files/zh-cn/web/api/document/onbeforescriptexecute/index.html b/files/zh-cn/web/api/document/onbeforescriptexecute/index.html deleted file mode 100644 index 3025444d28..0000000000 --- a/files/zh-cn/web/api/document/onbeforescriptexecute/index.html +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: element.onbeforescriptexecute -slug: Web/API/Document/onbeforescriptexecute -tags: - - DOM - - onbeforescriptexecute -translation_of: Web/API/Document/onbeforescriptexecute ---- -
{{ApiRef}}{{gecko_minversion_header("2")}}
- -

概述

- -

当HTML文档中的<script>标签内的代码将要执行时触发该事件,如果这个script标签是用appendChild()等方法动态添加上去的,则不会触发该事件.

- -

语法

- -
document.onbeforescriptexecute = funcRef;
-
- -

beforescriptexecute事件触发时,funcRef函数就会被调用. 传入参数eventtarget属性指向触发该事件的那个script元素.

- -

例子

- -
function starting(e) {
-  logMessage("Starting script with ID: " + e.target.id);
-}
-
-document.addEventListener("beforescriptexecute", starting, true);
-
- -

查看在线演示

- -

规范

- - - -

相关链接

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