blob: d1b11536069f0d8a86adf5ff35a275aa2edc8045 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
---
title: Document.onfullscreenerror
slug: Web/API/Document/onfullscreenerror
tags:
- API
- Document
- Event Handler
- Fullscreen API
- Property
- Reference
- イベントハンドラー
- エラー
- 全画面
- 全画面 API
translation_of: Web/API/Document/onfullscreenerror
---
<div>{{ApiRef("Fullscreen API")}}</div>
<p><span class="seoSummary"><code><strong>Document.onfullscreenerror</strong></code> プロパティは、文書が直前の {{domxref("Element.requestFullscreen()")}} の呼び出しの後で全画面モードへの移行に失敗したときに、文書に送信される {{event("fullscreenerror")}} イベントのイベントハンドラーです。</span></p>
<h2 id="Syntax" name="Syntax">構文</h2>
<pre class="syntaxbox"><var>targetDocument</var>.onfullscreenerror = <var>fullscreenErrorHandler</var>;
</pre>
<h3 id="Value" name="Value">値</h3>
<p>{{event("fullscreenerror")}} イベントのイベントハンドラーです。</p>
<h2 id="Example" name="Example">例</h2>
<p>この例では <code>requestFullscreen()</code> をイベントハンドラーの外で呼び出そうとしています。 <code>requestFullscreen()</code> はセキュリティ上の理由から、ユーザー操作への応答の中でしか呼び出せないため、これは失敗し、 <code>fullscreenerror</code> が発生して document に送られます。</p>
<pre class="brush: js">document.onfullscreenerror = function ( event ) {
displayWarning("Unable to switch into full-screen mode.");
};
//....
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-onfullscreenerror", "onfullscreenerror")}}</td>
<td>{{Spec2("HTML WHATWG")}}</td>
<td>初回定義</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2>
<p>{{Compat("api.Document.onfullscreenerror")}}</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("fullscreenerror")}}</li>
<li>{{domxref("Document.onfullscreenchange")}}</li>
<li>{{domxref("Element.onfullscreenerror")}}</li>
</ul>
|