diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
| commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
| tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/notification/requireinteraction/index.html | |
| parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
| download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip | |
initial commit
Diffstat (limited to 'files/ja/web/api/notification/requireinteraction/index.html')
| -rw-r--r-- | files/ja/web/api/notification/requireinteraction/index.html | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/files/ja/web/api/notification/requireinteraction/index.html b/files/ja/web/api/notification/requireinteraction/index.html new file mode 100644 index 0000000000..a03568ee3c --- /dev/null +++ b/files/ja/web/api/notification/requireinteraction/index.html @@ -0,0 +1,66 @@ +--- +title: Notification.requireInteraction +slug: Web/API/Notification/requireInteraction +tags: + - API + - DOM + - Notification + - Notifications API + - Property + - Reference + - Web + - requireInteraction + - プロパティ + - 通知 +translation_of: Web/API/Notification/requireInteraction +--- +<p>{{APIRef("Web Notifications")}}{{AvailableInWorkers}}{{securecontext_header}}</p> + +<p><strong><code>requireInteraction</code></strong> は {{domxref("Notification")}} インターフェイスの読取専用プロパティで、ユーザーがクリックするか閉じるかするまで、通知が自動的に閉じずに残るべきであることを示す {{jsxref("Boolean")}} を返します。</p> + +<div class="note"> +<p><strong>注</strong>: これは最初に、 {{domxref("Notification.Notification()")}} コンストラクターの option オブジェクトの <code>requireInteraction</code> が <code>true</code> の状態で生成されたときに設定されることがあります。</p> +</div> + +<h2 id="Syntax" name="Syntax">構文</h2> + +<pre class="brush: js notranslate">function spawnNotification(theTitle,theBody,shouldRequireInteraction) { + var options = { + body: theBody, + requireInteraction: shouldRequireInteraction + } + var n = new Notification(theTitle,options); +}</pre> + +<h3 id="Return_Value" name="Return_Value">値</h3> + +<p>{{jsxref("Boolean")}} です。</p> + +<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('Web Notifications','#dom-notification-requireinteraction','requireInteraction')}}</td> + <td>{{Spec2('Web Notifications')}}</td> + <td>Living standard</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.Notification.requireInteraction")}}</p> + +<h2 id="See_also" name="See_also">関連情報</h2> + +<ul> + <li><a href="/ja/docs/Web/API/Notifications_API/Using_the_Notifications_API">通知 API の使用</a></li> +</ul> |
