aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/windoweventhandlers/onunhandledrejection/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/windoweventhandlers/onunhandledrejection/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/api/windoweventhandlers/onunhandledrejection/index.html')
-rw-r--r--files/ja/web/api/windoweventhandlers/onunhandledrejection/index.html57
1 files changed, 57 insertions, 0 deletions
diff --git a/files/ja/web/api/windoweventhandlers/onunhandledrejection/index.html b/files/ja/web/api/windoweventhandlers/onunhandledrejection/index.html
new file mode 100644
index 0000000000..5c4f100cec
--- /dev/null
+++ b/files/ja/web/api/windoweventhandlers/onunhandledrejection/index.html
@@ -0,0 +1,57 @@
+---
+title: WindowEventHandlers.onunhandledrejection
+slug: Web/API/WindowEventHandlers/onunhandledrejection
+tags:
+ - API
+ - Event Handler
+ - HTML DOM
+ - Promises
+ - Property
+ - Reference
+ - WindowEventHandlers
+ - events
+ - onunhandledrejection
+translation_of: Web/API/WindowEventHandlers/onunhandledrejection
+---
+<div>{{APIRef}}</div>
+
+<p><span class="seoSummary">{{domxref("WindowEventHandlers")}} ミックスインの <strong><code>onunhandledrejection</code></strong> プロパティは、{{event("unhandledrejection")}} イベントを処理するための {{domxref("EventHandler")}} です。 このイベントは、処理されなかった {{jsxref("Promise")}} 拒否に対して発生します。</span></p>
+
+<h2 id="Syntax" name="Syntax">構文</h2>
+
+<pre class="syntaxbox">window.onunhandledrejection = <em>function</em>;</pre>
+
+<h3 id="Value" name="Value">値</h3>
+
+<p><code>function</code> は、ウィンドウが <code>unhandledrejection</code> イベントを受け取ったときに呼び出す {{domxref("EventHandler")}} または関数です。 イベントハンドラは、{{domxref("PromiseRejectionEvent")}} を入力パラメーターとして受け取ります。</p>
+
+<h2 id="Examples" name="Examples">例</h2>
+
+<p>この例では、処理されなかった拒否の <code>reason</code> 値を単にコンソールに記録します。</p>
+
+<pre class="brush: js">window.onunhandledrejection = function(e) {
+ console.log(e.reason);
+}</pre>
+
+<h2 id="Specifications" name="Specifications">仕様</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">仕様</th>
+ <th scope="col">状態</th>
+ <th scope="col">コメント</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', 'webappapis.html#handler-window-onunhandledrejection', 'onunhandledrejection')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>初期定義</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
+
+
+
+<p>{{Compat("api.WindowEventHandlers.onunhandledrejection")}}</p>