From 52c12c1c3a8a92091f5caadf2cd1cc632b345d39 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sun, 18 Jul 2021 23:58:20 +0900 Subject: Web/API/CSSStyleDeclaration 以下を更新 (#1482) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Web/API/CSSStyleDeclaration/cssText を新規翻訳 2021/06/13 時点の英語版に基づき新規翻訳 * Web/API/CSSStyleDeclaration 以下を整備 Web/API/CSSStyleDeclaration 以下について、2021/07/10時点の内容に同期。未翻訳の記事については新規翻訳 --- .../getpropertypriority/index.html | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 files/ja/web/api/cssstyledeclaration/getpropertypriority/index.html (limited to 'files/ja/web/api/cssstyledeclaration/getpropertypriority') 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 +--- +

{{ APIRef("CSSOM") }}

+ +

CSSStyleDeclaration.getPropertyPriority() メソッドインターフェイスは、 {{domxref('DOMString')}} でその CSS プロパティに明示的に設定されたすべての優先度を返します。

+ +

構文

+ +
var priority = style.getPropertyPriority(property);
+ +

引数

+ + + +

返値

+ + + +

+ +

以下の JavaScript コードは、 margin が CSS セレクターの規則で important と記されているかどうかをチェックします。

+ +
var declaration = document.styleSheets[0].cssRules[0].style;
+var isImportant = declaration.getPropertyPriority('margin') === 'important';
+
+ +

仕様書

+ +{{Specifications}} + +

ブラウザーの互換性

+ +

{{Compat}}

-- cgit v1.2.3-54-g00ecf