diff options
| author | Masahiro FUJIMOTO <mfujimot@gmail.com> | 2021-07-18 23:58:20 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-18 23:58:20 +0900 |
| commit | 52c12c1c3a8a92091f5caadf2cd1cc632b345d39 (patch) | |
| tree | 424efe84033a7527208833211a8d89ca8210abbb /files/ja/web/api/cssstyledeclaration/getpropertypriority/index.html | |
| parent | 2a6500fa9b98c7b57305b14744fea66a58724291 (diff) | |
| download | translated-content-52c12c1c3a8a92091f5caadf2cd1cc632b345d39.tar.gz translated-content-52c12c1c3a8a92091f5caadf2cd1cc632b345d39.tar.bz2 translated-content-52c12c1c3a8a92091f5caadf2cd1cc632b345d39.zip | |
Web/API/CSSStyleDeclaration 以下を更新 (#1482)
* Web/API/CSSStyleDeclaration/cssText を新規翻訳
2021/06/13 時点の英語版に基づき新規翻訳
* Web/API/CSSStyleDeclaration 以下を整備
Web/API/CSSStyleDeclaration 以下について、2021/07/10時点の内容に同期。未翻訳の記事については新規翻訳
Diffstat (limited to 'files/ja/web/api/cssstyledeclaration/getpropertypriority/index.html')
| -rw-r--r-- | files/ja/web/api/cssstyledeclaration/getpropertypriority/index.html | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/files/ja/web/api/cssstyledeclaration/getpropertypriority/index.html b/files/ja/web/api/cssstyledeclaration/getpropertypriority/index.html new file mode 100644 index 0000000000..36a6406cf0 --- /dev/null +++ b/files/ja/web/api/cssstyledeclaration/getpropertypriority/index.html @@ -0,0 +1,47 @@ +--- +title: CSSStyleDeclaration.getPropertyPriority() +slug: Web/API/CSSStyleDeclaration/getPropertyPriority +tags: +- API +- CSSOM +- Method +- Reference +browser-compat: api.CSSStyleDeclaration.getPropertyPriority +translation_of: Web/API/CSSStyleDeclaration/getPropertyPriority +--- +<p>{{ APIRef("CSSOM") }}</p> + +<p><strong>CSSStyleDeclaration.getPropertyPriority()</strong> メソッドインターフェイスは、 {{domxref('DOMString')}} でその CSS プロパティに明示的に設定されたすべての優先度を返します。</p> + +<h2 id="Syntax">構文</h2> + +<pre + class="brush: js">var <em>priority</em> = <em>style</em>.getPropertyPriority(<em>property</em>);</pre> + +<h3 id="Parameters">引数</h3> + +<ul> + <li><em><code>property</code></em> は {{domxref('DOMString')}} で、チェックするプロパティ名を表します。</li> +</ul> + +<h3 id="Return_value">返値</h3> + +<ul> + <li><code><em>priority</em></code> は {{domxref('DOMString')}} で、存在する場合は優先度 (<code>"important"</code> など) を表します。存在しない場合は、空文字列を返します。</li> +</ul> + +<h2 id="Example">例</h2> + +<p>以下の JavaScript コードは、 <code>margin</code> が CSS セレクターの規則で important と記されているかどうかをチェックします。</p> + +<pre class="brush: js">var declaration = document.styleSheets[0].cssRules[0].style; +var isImportant = declaration.getPropertyPriority('margin') === 'important'; +</pre> + +<h2 id="Specifications">仕様書</h2> + +{{Specifications}} + +<h2 id="Browser_compatibility">ブラウザーの互換性</h2> + +<p>{{Compat}}</p> |
