aboutsummaryrefslogtreecommitdiff
path: root/files/ja
diff options
context:
space:
mode:
authorMasahiro FUJIMOTO <mfujimot@gmail.com>2021-04-18 00:31:39 +0900
committerGitHub <noreply@github.com>2021-04-18 00:31:39 +0900
commit33d52ff611c0da0039a2c07ebd7ca0c9645e2cff (patch)
treeac42f3e9a92221e5924772afde61d4850629efdf /files/ja
parent7ce68172263eecf6b0057a40e313f719bb8e24c6 (diff)
downloadtranslated-content-33d52ff611c0da0039a2c07ebd7ca0c9645e2cff.tar.gz
translated-content-33d52ff611c0da0039a2c07ebd7ca0c9645e2cff.tar.bz2
translated-content-33d52ff611c0da0039a2c07ebd7ca0c9645e2cff.zip
DOMTokenList.supports を新規翻訳 (#424)
2021/03/11 時点の英語版に基づき新規翻訳
Diffstat (limited to 'files/ja')
-rw-r--r--files/ja/web/api/domtokenlist/supports/index.html69
1 files changed, 69 insertions, 0 deletions
diff --git a/files/ja/web/api/domtokenlist/supports/index.html b/files/ja/web/api/domtokenlist/supports/index.html
new file mode 100644
index 0000000000..31af1e1455
--- /dev/null
+++ b/files/ja/web/api/domtokenlist/supports/index.html
@@ -0,0 +1,69 @@
+---
+title: DOMTokenList.supports()
+slug: Web/API/DOMTokenList/supports
+tags:
+ - API
+ - DOM
+ - Method
+ - Reference
+translation_of: Web/API/DOMTokenList/supports
+---
+<p>{{APIRef("DOM")}}{{SeeCompatTable}}</p>
+
+<p><span class="seoSummary"><strong><code>supports()</code></strong> は {{domxref("DOMTokenList")}} インターフェイスのメソッドで、渡された <code><var>token</var></code> が関連する属性で対応しているトークンに含まれていれば <code>true</code> を返します。このメソッドは機能に対応しているかを検出するためのものです。</span></p>
+
+<h2 id="Syntax">構文</h2>
+
+<pre
+ class="brush: js">let <var>trueOrFalse</var> = <var>element</var>.supports(<var>token</var>)</pre>
+
+<h3 id="Parameters">引数</h3>
+
+<dl>
+ <dt><code><var>token</var></code></dt>
+ <dd>{{domxref("DOMString")}} で、問い合わせるトークンが入ります。</dd>
+</dl>
+
+<h3 id="Returns">返値</h3>
+
+<p>{{jsxref("Boolean")}} で、トークンが見つかったかどうかを返します。</p>
+
+<h2 id="Example">例</h2>
+
+<pre class="brush: js">let iframe = document.getElementById('display');
+
+if (iframe.sandbox.supports('an-upcoming-feature')) {
+ // support code for mystery future feature
+} else {
+ // fallback code
+}
+
+if (iframe.sandbox.supports('allow-scripts')) {
+ // instruct frame to run JavaScript
+ //
+ // (NOTE: This feature is well-supported; this is just an example!)
+ //
+}</pre>
+
+<h2 id="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('Credential Management')}}</td>
+ <td>{{Spec2('Credential Management')}}</td>
+ <td>初回定義</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">ブラウザーの互換性</h2>
+
+<p>{{Compat("api.DOMTokenList.supports")}}</p>