From 01f082cdc9c06afc6dfa7573345590ea9eec8714 Mon Sep 17 00:00:00 2001 From: MDN Date: Sat, 12 Feb 2022 00:56:58 +0000 Subject: [CRON] sync translated content --- files/fr/_redirects.txt | 1 + files/fr/_wikihistory.json | 12 +-- .../api/document/fullscreenchange_event/index.md | 40 ++++++++ .../web/api/document/onfullscreenchange/index.md | 39 -------- files/ja/_redirects.txt | 6 +- files/ja/_wikihistory.json | 28 +++--- .../api/document/fullscreenchange_event/index.html | 75 +++++++++++++++ .../api/document/fullscreenerror_event/index.html | 75 +++++++++++++++ .../web/api/document/onfullscreenchange/index.html | 74 --------------- .../web/api/document/onfullscreenerror/index.html | 74 --------------- files/zh-cn/_redirects.txt | 2 + files/zh-cn/_wikihistory.json | 26 +++--- .../api/document/fullscreenchange_event/index.html | 67 +++++++++++++ .../api/document/fullscreenerror_event/index.html | 104 +++++++++++++++++++++ .../web/api/document/onfullscreenchange/index.html | 66 ------------- .../web/api/document/onfullscreenerror/index.html | 103 -------------------- 16 files changed, 401 insertions(+), 391 deletions(-) create mode 100644 files/fr/conflicting/web/api/document/fullscreenchange_event/index.md delete mode 100644 files/fr/web/api/document/onfullscreenchange/index.md create mode 100644 files/ja/conflicting/web/api/document/fullscreenchange_event/index.html create mode 100644 files/ja/conflicting/web/api/document/fullscreenerror_event/index.html delete mode 100644 files/ja/web/api/document/onfullscreenchange/index.html delete mode 100644 files/ja/web/api/document/onfullscreenerror/index.html create mode 100644 files/zh-cn/conflicting/web/api/document/fullscreenchange_event/index.html create mode 100644 files/zh-cn/web/api/document/fullscreenerror_event/index.html delete mode 100644 files/zh-cn/web/api/document/onfullscreenchange/index.html delete mode 100644 files/zh-cn/web/api/document/onfullscreenerror/index.html diff --git a/files/fr/_redirects.txt b/files/fr/_redirects.txt index aa042cdec3..49ed5094a6 100644 --- a/files/fr/_redirects.txt +++ b/files/fr/_redirects.txt @@ -3521,6 +3521,7 @@ /fr/docs/Web/API/Document/defaultView/popstate_event /fr/docs/Web/API/Window/popstate_event /fr/docs/Web/API/Document/defaultView/storage_event /fr/docs/Web/API/Window/storage_event /fr/docs/Web/API/Document/domConfig /fr/docs/Web/API/Document +/fr/docs/Web/API/Document/onfullscreenchange /fr/docs/conflicting/Web/API/Document/fullscreenchange_event /fr/docs/Web/API/DocumentOrShadowRoot/activeElement /fr/docs/Web/API/Document/activeElement /fr/docs/Web/API/DocumentOrShadowRoot/elementFromPoint /fr/docs/Web/API/Document/elementFromPoint /fr/docs/Web/API/DocumentOrShadowRoot/elementsFromPoint /fr/docs/Web/API/Document/elementsFromPoint diff --git a/files/fr/_wikihistory.json b/files/fr/_wikihistory.json index 433a88c540..6a56dc0773 100644 --- a/files/fr/_wikihistory.json +++ b/files/fr/_wikihistory.json @@ -14208,12 +14208,6 @@ "loella16" ] }, - "Web/API/Document/onfullscreenchange": { - "modified": "2019-03-23T22:29:20.848Z", - "contributors": [ - "Dwaaren" - ] - }, "Web/API/Document/onoffline": { "modified": "2019-03-18T21:39:15.173Z", "contributors": [ @@ -42890,6 +42884,12 @@ "Alexgruissan" ] }, + "conflicting/Web/API/Document/fullscreenchange_event": { + "modified": "2019-03-23T22:29:20.848Z", + "contributors": [ + "Dwaaren" + ] + }, "conflicting/Web/API/Document_Object_Model": { "modified": "2019-03-23T23:53:23.967Z", "contributors": [ diff --git a/files/fr/conflicting/web/api/document/fullscreenchange_event/index.md b/files/fr/conflicting/web/api/document/fullscreenchange_event/index.md new file mode 100644 index 0000000000..221339f844 --- /dev/null +++ b/files/fr/conflicting/web/api/document/fullscreenchange_event/index.md @@ -0,0 +1,40 @@ +--- +title: Document.onfullscreenchange +slug: conflicting/Web/API/Document/fullscreenchange_event +translation_of: Web/API/Document/onfullscreenchange +original_slug: Web/API/Document/onfullscreenchange +--- +{{ApiRef("Fullscreen API")}} + +La propriété **`Document.onfullscreenchange`** est un gestionnaire d'événement pour l'événement {{event("fullscreenchange")}} qui est lancé lorsque le document entre ou sort du mode plein écran. + +## Syntaxe + + targetDocument.onfullscreenchange = fullscreenChangeHandler; + +## Exemple + +```js +document.onfullscreenchange = function ( event ) { + console.log("FULL SCREEN CHANGE") +}; +document.documentElement.onclick = function () { + // requestFullscreen() doit être un gestionnaire d'événement, sinon ça échouera + document.documentElement.requestFullscreen(); +} +``` + +## Specifications + +| Specification | Status | Comment | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------- | +| {{SpecName("Fullscreen", "#handler-document-onfullscreenchange", "onfullscreenchange")}} | {{Spec2("HTML WHATWG")}} | Initial definition. | + +## Compatibilité des navigateurs + +{{Compat("api.Document.onfullscreenchange")}} + +## Voir aussi + +- {{event("fullscreenchange")}} +- {{domxref("Document.onfullscreenerror")}} diff --git a/files/fr/web/api/document/onfullscreenchange/index.md b/files/fr/web/api/document/onfullscreenchange/index.md deleted file mode 100644 index 61bd3e188d..0000000000 --- a/files/fr/web/api/document/onfullscreenchange/index.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: Document.onfullscreenchange -slug: Web/API/Document/onfullscreenchange -translation_of: Web/API/Document/onfullscreenchange ---- -{{ApiRef("Fullscreen API")}} - -La propriété **`Document.onfullscreenchange`** est un gestionnaire d'événement pour l'événement {{event("fullscreenchange")}} qui est lancé lorsque le document entre ou sort du mode plein écran. - -## Syntaxe - - targetDocument.onfullscreenchange = fullscreenChangeHandler; - -## Exemple - -```js -document.onfullscreenchange = function ( event ) { - console.log("FULL SCREEN CHANGE") -}; -document.documentElement.onclick = function () { - // requestFullscreen() doit être un gestionnaire d'événement, sinon ça échouera - document.documentElement.requestFullscreen(); -} -``` - -## Specifications - -| Specification | Status | Comment | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------- | -| {{SpecName("Fullscreen", "#handler-document-onfullscreenchange", "onfullscreenchange")}} | {{Spec2("HTML WHATWG")}} | Initial definition. | - -## Compatibilité des navigateurs - -{{Compat("api.Document.onfullscreenchange")}} - -## Voir aussi - -- {{event("fullscreenchange")}} -- {{domxref("Document.onfullscreenerror")}} diff --git a/files/ja/_redirects.txt b/files/ja/_redirects.txt index d38381b778..bd6257cb70 100644 --- a/files/ja/_redirects.txt +++ b/files/ja/_redirects.txt @@ -82,8 +82,8 @@ /ja/docs/API/Document/location /ja/docs/Web/API/Document/location /ja/docs/API/Document/onafterscriptexecute /ja/docs/Web/API/Document/onafterscriptexecute /ja/docs/API/Document/onbeforescriptexecute /ja/docs/Web/API/Document/onbeforescriptexecute -/ja/docs/API/Document/onfullscreenchange /ja/docs/Web/API/Document/onfullscreenchange -/ja/docs/API/Document/onfullscreenerror /ja/docs/Web/API/Document/onfullscreenerror +/ja/docs/API/Document/onfullscreenchange /ja/docs/conflicting/Web/API/Document/fullscreenchange_event +/ja/docs/API/Document/onfullscreenerror /ja/docs/conflicting/Web/API/Document/fullscreenerror_event /ja/docs/API/Document/onselectionchange /ja/docs/Web/API/GlobalEventHandlers/onselectionchange /ja/docs/API/Document/open /ja/docs/Web/API/Document/open /ja/docs/API/Document/origin /ja/docs/Web/API/Document/origin @@ -3061,6 +3061,8 @@ /ja/docs/Web/API/Document/defaultView/storage_event /ja/docs/Web/API/Window/storage_event /ja/docs/Web/API/Document/domConfig /ja/docs/Web/API/Document /ja/docs/Web/API/Document/inputEncoding /ja/docs/Web/API/Document/characterSet +/ja/docs/Web/API/Document/onfullscreenchange /ja/docs/conflicting/Web/API/Document/fullscreenchange_event +/ja/docs/Web/API/Document/onfullscreenerror /ja/docs/conflicting/Web/API/Document/fullscreenerror_event /ja/docs/Web/API/Document/onselectionchange /ja/docs/Web/API/GlobalEventHandlers/onselectionchange /ja/docs/Web/API/DocumentOrShadowRoot/activeElement /ja/docs/Web/API/Document/activeElement /ja/docs/Web/API/DocumentOrShadowRoot/caretPositionFromPoint /ja/docs/Web/API/Document/caretPositionFromPoint diff --git a/files/ja/_wikihistory.json b/files/ja/_wikihistory.json index 5898cc2194..f8b4b6cbc4 100644 --- a/files/ja/_wikihistory.json +++ b/files/ja/_wikihistory.json @@ -12976,20 +12976,6 @@ "ethertank" ] }, - "Web/API/Document/onfullscreenchange": { - "modified": "2020-10-15T21:46:54.771Z", - "contributors": [ - "mfuji09", - "yyss" - ] - }, - "Web/API/Document/onfullscreenerror": { - "modified": "2020-10-15T21:46:52.945Z", - "contributors": [ - "mfuji09", - "yyss" - ] - }, "Web/API/Document/onoffline": { "modified": "2019-03-22T11:03:20.072Z", "contributors": [ @@ -48416,6 +48402,20 @@ "mfuji09" ] }, + "conflicting/Web/API/Document/fullscreenchange_event": { + "modified": "2020-10-15T21:46:54.771Z", + "contributors": [ + "mfuji09", + "yyss" + ] + }, + "conflicting/Web/API/Document/fullscreenerror_event": { + "modified": "2020-10-15T21:46:52.945Z", + "contributors": [ + "mfuji09", + "yyss" + ] + }, "conflicting/Web/API/File/name": { "modified": "2020-09-25T16:45:23.436Z", "contributors": [ diff --git a/files/ja/conflicting/web/api/document/fullscreenchange_event/index.html b/files/ja/conflicting/web/api/document/fullscreenchange_event/index.html new file mode 100644 index 0000000000..4c841161a0 --- /dev/null +++ b/files/ja/conflicting/web/api/document/fullscreenchange_event/index.html @@ -0,0 +1,75 @@ +--- +title: Document.onfullscreenchange +slug: conflicting/Web/API/Document/fullscreenchange_event +tags: + - API + - Document + - Event Handler + - Fullscreen API + - Property + - Reference + - イベントハンドラー + - プロパティ + - 全画面 API +translation_of: Web/API/Document/onfullscreenchange +original_slug: Web/API/Document/onfullscreenchange +--- +
{{APIRef("Fullscreen API")}}
+ +

{{domxref("Document")}} インターフェイスの onfullscreenchange プロパティは、文書が全画面モードに移行したり復帰したりする直前に発生する {{event("fullscreenchange")}} イベントのイベントハンドラーです。

+ +

構文

+ +
targetDocument.onfullscreenchange = fullscreenChangeHandler;
+
+ +

+ +

文書が全画面モードへの移行および復帰を示す {{event("fullscreenchange")}} イベントを受け取るたびに呼び出されるイベントハンドラーです。

+ +

使用上のメモ

+ +

fullscreenchange イベントは全画面モードへの移行か復帰かを直接特定する方法がないので、イベントハンドラーでは {{domxref("Document.fullscreenElement")}} の値を見てください。 null であれば、イベントは全画面モードからの復帰を示します。それ以外であれば、指定された要素が画面全体に表示されるところです。

+ +

+ +
document.onfullscreenchange = function ( event ) {
+  console.log("FULL SCREEN CHANGE")
+};
+document.documentElement.onclick = function () {
+  // requestFullscreen() はイベントハンドラー内で使用しなければなりません。そうしなければ失敗します。
+  document.documentElement.requestFullscreen();
+}
+
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("Fullscreen", "#handler-document-onfullscreenchange", "onfullscreenchange")}}{{Spec2("HTML WHATWG")}}初回定義
+ +

ブラウザーの対応

+ +

{{Compat("api.Document.onfullscreenchange")}}

+ +

関連情報

+ + diff --git a/files/ja/conflicting/web/api/document/fullscreenerror_event/index.html b/files/ja/conflicting/web/api/document/fullscreenerror_event/index.html new file mode 100644 index 0000000000..7bb78e498c --- /dev/null +++ b/files/ja/conflicting/web/api/document/fullscreenerror_event/index.html @@ -0,0 +1,75 @@ +--- +title: Document.onfullscreenerror +slug: conflicting/Web/API/Document/fullscreenerror_event +tags: + - API + - Document + - Event Handler + - Fullscreen API + - Property + - Reference + - イベントハンドラー + - エラー + - 全画面 + - 全画面 API +translation_of: Web/API/Document/onfullscreenerror +original_slug: Web/API/Document/onfullscreenerror +--- +
{{ApiRef("Fullscreen API")}}
+ +

Document.onfullscreenerror プロパティは、文書が直前の {{domxref("Element.requestFullscreen()")}} の呼び出しの後で全画面モードへの移行に失敗したときに、文書に送信される {{event("fullscreenerror")}} イベントのイベントハンドラーです。

+ +

構文

+ +
targetDocument.onfullscreenerror = fullscreenErrorHandler;
+
+ +

+ +

{{event("fullscreenerror")}} イベントのイベントハンドラーです。

+ +

+ +

この例では requestFullscreen() をイベントハンドラーの外で呼び出そうとしています。 requestFullscreen() はセキュリティ上の理由から、ユーザー操作への応答の中でしか呼び出せないため、これは失敗し、 fullscreenerror が発生して document に送られます。

+ +
document.onfullscreenerror = function ( event ) {
+  displayWarning("Unable to switch into full-screen mode.");
+};
+
+//....
+
+document.documentElement.requestFullscreen();
+
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("Fullscreen", "#handler-document-onfullscreenerror", "onfullscreenerror")}}{{Spec2("HTML WHATWG")}}初回定義
+ +

ブラウザーの対応

+ +

{{Compat("api.Document.onfullscreenerror")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/document/onfullscreenchange/index.html b/files/ja/web/api/document/onfullscreenchange/index.html deleted file mode 100644 index 36d6f6f7a5..0000000000 --- a/files/ja/web/api/document/onfullscreenchange/index.html +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: Document.onfullscreenchange -slug: Web/API/Document/onfullscreenchange -tags: - - API - - Document - - Event Handler - - Fullscreen API - - Property - - Reference - - イベントハンドラー - - プロパティ - - 全画面 API -translation_of: Web/API/Document/onfullscreenchange ---- -
{{APIRef("Fullscreen API")}}
- -

{{domxref("Document")}} インターフェイスの onfullscreenchange プロパティは、文書が全画面モードに移行したり復帰したりする直前に発生する {{event("fullscreenchange")}} イベントのイベントハンドラーです。

- -

構文

- -
targetDocument.onfullscreenchange = fullscreenChangeHandler;
-
- -

- -

文書が全画面モードへの移行および復帰を示す {{event("fullscreenchange")}} イベントを受け取るたびに呼び出されるイベントハンドラーです。

- -

使用上のメモ

- -

fullscreenchange イベントは全画面モードへの移行か復帰かを直接特定する方法がないので、イベントハンドラーでは {{domxref("Document.fullscreenElement")}} の値を見てください。 null であれば、イベントは全画面モードからの復帰を示します。それ以外であれば、指定された要素が画面全体に表示されるところです。

- -

- -
document.onfullscreenchange = function ( event ) {
-  console.log("FULL SCREEN CHANGE")
-};
-document.documentElement.onclick = function () {
-  // requestFullscreen() はイベントハンドラー内で使用しなければなりません。そうしなければ失敗します。
-  document.documentElement.requestFullscreen();
-}
-
- -

仕様書

- - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName("Fullscreen", "#handler-document-onfullscreenchange", "onfullscreenchange")}}{{Spec2("HTML WHATWG")}}初回定義
- -

ブラウザーの対応

- -

{{Compat("api.Document.onfullscreenchange")}}

- -

関連情報

- - diff --git a/files/ja/web/api/document/onfullscreenerror/index.html b/files/ja/web/api/document/onfullscreenerror/index.html deleted file mode 100644 index d1b1153606..0000000000 --- a/files/ja/web/api/document/onfullscreenerror/index.html +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: Document.onfullscreenerror -slug: Web/API/Document/onfullscreenerror -tags: - - API - - Document - - Event Handler - - Fullscreen API - - Property - - Reference - - イベントハンドラー - - エラー - - 全画面 - - 全画面 API -translation_of: Web/API/Document/onfullscreenerror ---- -
{{ApiRef("Fullscreen API")}}
- -

Document.onfullscreenerror プロパティは、文書が直前の {{domxref("Element.requestFullscreen()")}} の呼び出しの後で全画面モードへの移行に失敗したときに、文書に送信される {{event("fullscreenerror")}} イベントのイベントハンドラーです。

- -

構文

- -
targetDocument.onfullscreenerror = fullscreenErrorHandler;
-
- -

- -

{{event("fullscreenerror")}} イベントのイベントハンドラーです。

- -

- -

この例では requestFullscreen() をイベントハンドラーの外で呼び出そうとしています。 requestFullscreen() はセキュリティ上の理由から、ユーザー操作への応答の中でしか呼び出せないため、これは失敗し、 fullscreenerror が発生して document に送られます。

- -
document.onfullscreenerror = function ( event ) {
-  displayWarning("Unable to switch into full-screen mode.");
-};
-
-//....
-
-document.documentElement.requestFullscreen();
-
- -

仕様書

- - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName("Fullscreen", "#handler-document-onfullscreenerror", "onfullscreenerror")}}{{Spec2("HTML WHATWG")}}初回定義
- -

ブラウザーの対応

- -

{{Compat("api.Document.onfullscreenerror")}}

- -

関連情報

- - diff --git a/files/zh-cn/_redirects.txt b/files/zh-cn/_redirects.txt index 3fa6160c00..84dfe0d381 100644 --- a/files/zh-cn/_redirects.txt +++ b/files/zh-cn/_redirects.txt @@ -1265,6 +1265,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/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 /zh-CN/docs/Web/API/Document/rouchmove_event /zh-CN/docs/Web/API/Document/touchmove_event /zh-CN/docs/Web/API/DocumentOrShadowRoot/activeElement /zh-CN/docs/Web/API/Document/activeElement diff --git a/files/zh-cn/_wikihistory.json b/files/zh-cn/_wikihistory.json index 6cbfab7e35..4589deb197 100644 --- a/files/zh-cn/_wikihistory.json +++ b/files/zh-cn/_wikihistory.json @@ -11097,6 +11097,12 @@ "zhaoshouxin" ] }, + "Web/API/Document/fullscreenerror_event": { + "modified": "2019-04-27T09:18:56.721Z", + "contributors": [ + "ZWkang" + ] + }, "Web/API/Document/getElementById": { "modified": "2020-10-15T21:32:38.932Z", "contributors": [ @@ -11295,19 +11301,6 @@ "zhangyaochun1987" ] }, - "Web/API/Document/onfullscreenchange": { - "modified": "2020-10-15T21:49:09.799Z", - "contributors": [ - "gentlecoder", - "libmw" - ] - }, - "Web/API/Document/onfullscreenerror": { - "modified": "2019-04-27T09:18:56.721Z", - "contributors": [ - "ZWkang" - ] - }, "Web/API/Document/onoffline": { "modified": "2019-03-23T22:24:33.524Z", "contributors": [ @@ -46843,6 +46836,13 @@ "yulifu" ] }, + "conflicting/Web/API/Document/fullscreenchange_event": { + "modified": "2020-10-15T21:49:09.799Z", + "contributors": [ + "gentlecoder", + "libmw" + ] + }, "conflicting/Web/API/Document/hasFocus": { "modified": "2019-03-23T23:31:56.410Z", "contributors": [ diff --git a/files/zh-cn/conflicting/web/api/document/fullscreenchange_event/index.html b/files/zh-cn/conflicting/web/api/document/fullscreenchange_event/index.html new file mode 100644 index 0000000000..278159eada --- /dev/null +++ b/files/zh-cn/conflicting/web/api/document/fullscreenchange_event/index.html @@ -0,0 +1,67 @@ +--- +title: Document.onfullscreenchange +slug: conflicting/Web/API/Document/fullscreenchange_event +tags: + - API + - Document + - onfullscreenchange +translation_of: Web/API/Document/onfullscreenchange +original_slug: Web/API/Document/onfullscreenchange +--- +
{{ApiRef("Fullscreen API")}}
+ +

{{domxref("Document")}}接口的onfullscreenchange 属性是 {{event("fullscreenchange")}} 事件的处理器,该处理器在文档进入或者退出全屏模式的时候立即触发。

+ +

语法

+ +
targetDocument.onfullscreenchange = fullscreenChangeHandler;
+
+ +

Value

+ +

每当文档接收到{{event("fullscreenchange")}} 事件时都会调用该事件处理程序,它表明文档正在进入或退出全屏模式。

+ +

使用说明

+ +

fullscreenchange事件不会直接说明文档当前是进入还是退出全屏模式,因此你的事件处理程序应查看{{domxref("Document.fullscreenElement")}}的值。 如果为null,则该事件表示已退出全屏模式; 否则,指定的元素将接管屏幕。

+ +

示例

+ +
document.onfullscreenchange = function ( event ) {
+  console.log("FULL SCREEN CHANGE")
+};
+document.documentElement.onclick = function () {
+  // requestFullscreen() 方法必须在一个事件处理器的方法体里执行,否则将会失败
+  document.documentElement.requestFullscreen();
+}
+
+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName("Fullscreen", "#handler-document-onfullscreenchange", "onfullscreenchange")}}{{Spec2("HTML WHATWG")}}Initial definition.
+ +

Browser compatibility

+ +

{{Compat("api.Document.onfullscreenchange")}}

+ +

相关文章

+ + diff --git a/files/zh-cn/web/api/document/fullscreenerror_event/index.html b/files/zh-cn/web/api/document/fullscreenerror_event/index.html new file mode 100644 index 0000000000..acddbe6963 --- /dev/null +++ b/files/zh-cn/web/api/document/fullscreenerror_event/index.html @@ -0,0 +1,104 @@ +--- +title: Document.onfullscreenerror +slug: Web/API/Document/fullscreenerror_event +translation_of: Web/API/Document/onfullscreenerror +original_slug: Web/API/Document/onfullscreenerror +--- +
{{ApiRef("Fullscreen API")}}
+ +

Document.onfullscreenerror 属性是一个事件处理器用于处理 {{event("fullscreenchange")}} 事件,在当前文档不能进入全屏模式,即使它被请求时触发。

+ +

语法

+ +
targetDocument.onfullscreenerror = fullscreenErrorHandler;
+
+ +

示例

+ +
document.onfullscreenerror = function ( event ) {
+  console.log("FULL SCREEN DENIED")
+};
+
+// requestFullscreen()将会失败,因为它在事件处理器之外
+document.documentElement.requestFullscreen();
+
+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName("Fullscreen", "#handler-document-onfullscreenerror", "onfullscreenerror")}}{{Spec2("HTML WHATWG")}}Initial definition.
+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatChrome(45)}}{{CompatGeckoDesktop("47")}}[1] (behind full-screen-api.unprefix.enabled{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroid WebviewChrome for AndroidFirefox Mobile (Gecko)Firefox OSIE MobileOpera MobileSafari Mobile
Basic support{{CompatChrome(45)}}{{CompatChrome(45)}}{{CompatGeckoDesktop("47")}} [1] (behind full-screen-api.unprefix.enabled{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

[1] 在Firefox 49之前, 此属性从技术上来说属于{{domxref("GlobalEventHandlers")}}, 但把相关的事件处理器绑定在一个 {{domxref("Element")}}上时却永远不会触发.

+ +

相关文章

+ + diff --git a/files/zh-cn/web/api/document/onfullscreenchange/index.html b/files/zh-cn/web/api/document/onfullscreenchange/index.html deleted file mode 100644 index e012de078f..0000000000 --- a/files/zh-cn/web/api/document/onfullscreenchange/index.html +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Document.onfullscreenchange -slug: Web/API/Document/onfullscreenchange -tags: - - API - - Document - - onfullscreenchange -translation_of: Web/API/Document/onfullscreenchange ---- -
{{ApiRef("Fullscreen API")}}
- -

{{domxref("Document")}}接口的onfullscreenchange 属性是 {{event("fullscreenchange")}} 事件的处理器,该处理器在文档进入或者退出全屏模式的时候立即触发。

- -

语法

- -
targetDocument.onfullscreenchange = fullscreenChangeHandler;
-
- -

Value

- -

每当文档接收到{{event("fullscreenchange")}} 事件时都会调用该事件处理程序,它表明文档正在进入或退出全屏模式。

- -

使用说明

- -

fullscreenchange事件不会直接说明文档当前是进入还是退出全屏模式,因此你的事件处理程序应查看{{domxref("Document.fullscreenElement")}}的值。 如果为null,则该事件表示已退出全屏模式; 否则,指定的元素将接管屏幕。

- -

示例

- -
document.onfullscreenchange = function ( event ) {
-  console.log("FULL SCREEN CHANGE")
-};
-document.documentElement.onclick = function () {
-  // requestFullscreen() 方法必须在一个事件处理器的方法体里执行,否则将会失败
-  document.documentElement.requestFullscreen();
-}
-
- -

规范

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("Fullscreen", "#handler-document-onfullscreenchange", "onfullscreenchange")}}{{Spec2("HTML WHATWG")}}Initial definition.
- -

Browser compatibility

- -

{{Compat("api.Document.onfullscreenchange")}}

- -

相关文章

- - diff --git a/files/zh-cn/web/api/document/onfullscreenerror/index.html b/files/zh-cn/web/api/document/onfullscreenerror/index.html deleted file mode 100644 index 341f7b0982..0000000000 --- a/files/zh-cn/web/api/document/onfullscreenerror/index.html +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: Document.onfullscreenerror -slug: Web/API/Document/onfullscreenerror -translation_of: Web/API/Document/onfullscreenerror ---- -
{{ApiRef("Fullscreen API")}}
- -

Document.onfullscreenerror 属性是一个事件处理器用于处理 {{event("fullscreenchange")}} 事件,在当前文档不能进入全屏模式,即使它被请求时触发。

- -

语法

- -
targetDocument.onfullscreenerror = fullscreenErrorHandler;
-
- -

示例

- -
document.onfullscreenerror = function ( event ) {
-  console.log("FULL SCREEN DENIED")
-};
-
-// requestFullscreen()将会失败,因为它在事件处理器之外
-document.documentElement.requestFullscreen();
-
- -

规范

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("Fullscreen", "#handler-document-onfullscreenerror", "onfullscreenerror")}}{{Spec2("HTML WHATWG")}}Initial definition.
- -

浏览器兼容性

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatChrome(45)}}{{CompatGeckoDesktop("47")}}[1] (behind full-screen-api.unprefix.enabled{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroid WebviewChrome for AndroidFirefox Mobile (Gecko)Firefox OSIE MobileOpera MobileSafari Mobile
Basic support{{CompatChrome(45)}}{{CompatChrome(45)}}{{CompatGeckoDesktop("47")}} [1] (behind full-screen-api.unprefix.enabled{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

[1] 在Firefox 49之前, 此属性从技术上来说属于{{domxref("GlobalEventHandlers")}}, 但把相关的事件处理器绑定在一个 {{domxref("Element")}}上时却永远不会触发.

- -

相关文章

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