diff options
Diffstat (limited to 'files/ja/web/api/document/onfullscreenchange')
-rw-r--r-- | files/ja/web/api/document/onfullscreenchange/index.html | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/files/ja/web/api/document/onfullscreenchange/index.html b/files/ja/web/api/document/onfullscreenchange/index.html new file mode 100644 index 0000000000..8f65458f20 --- /dev/null +++ b/files/ja/web/api/document/onfullscreenchange/index.html @@ -0,0 +1,76 @@ +--- +title: Document.onfullscreenchange +slug: Web/API/Document/onfullscreenchange +tags: + - API + - Document + - Event Handler + - Fullscreen API + - Property + - Reference + - イベントハンドラー + - プロパティ + - 全画面 API +translation_of: Web/API/Document/onfullscreenchange +--- +<div>{{APIRef("Fullscreen API")}}</div> + +<p><span class="seoSummary">{{domxref("Document")}} インターフェイスの <code><strong>onfullscreenchange</strong></code> プロパティは、文書が全画面モードに移行したり復帰したりする直前に発生する {{event("fullscreenchange")}} イベントのイベントハンドラーです。</span></p> + +<h2 id="Syntax" name="Syntax">構文</h2> + +<pre class="syntaxbox"><var>targetDocument</var>.onfullscreenchange = <var>fullscreenChangeHandler</var>; +</pre> + +<h3 id="Value" name="Value">値</h3> + +<p>文書が全画面モードへの移行および復帰を示す {{event("fullscreenchange")}} イベントを受け取るたびに呼び出されるイベントハンドラーです。</p> + +<h2 id="Usage_notes" name="Usage_notes">使用上のメモ</h2> + +<p><code>fullscreenchange</code> イベントは全画面モードへの移行か復帰かを直接特定する方法がないので、イベントハンドラーでは {{domxref("Document.fullscreenElement")}} の値を見てください。 <code>null</code> であれば、イベントは全画面モードからの<em>復帰</em>を示します。それ以外であれば、指定された要素が画面全体に表示されるところです。</p> + +<h2 id="Example" name="Example">例</h2> + +<pre class="brush: js">document.onfullscreenchange = function ( event ) { + console.log("FULL SCREEN CHANGE") +}; +document.documentElement.onclick = function () { + // requestFullscreen() はイベントハンドラー内で使用しなければなりません。そうしなければ失敗します。 + document.documentElement.requestFullscreen(); +} +</pre> + +<h2 id="Specifications" name="Specifications">仕様書</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">仕様書</th> + <th scope="col">状態</th> + <th scope="col">備考</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName("Fullscreen", "#handler-document-onfullscreenchange", "onfullscreenchange")}}</td> + <td>{{Spec2("HTML WHATWG")}}</td> + <td>初回定義</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2> + +<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div> + +<p>{{Compat("api.Document.onfullscreenchange")}}</p> + +<h2 id="See_also" name="See_also">関連情報</h2> + +<ul> + <li><a href="/ja/docs/Web/API/Fullscreen_API">Fullscreen API</a></li> + <li><a href="/ja/docs/Web/API/Fullscreen_API/Guide">Fullscreen API ガイド</a></li> + <li>{{event("fullscreenchange")}}</li> + <li>{{domxref("Document.onfullscreenerror")}}</li> +</ul> |