From 5e990a17012ff5ed90ae1559a11bbe4bc74c887a Mon Sep 17 00:00:00 2001 From: MDN Date: Tue, 8 Jun 2021 00:58:25 +0000 Subject: [CRON] sync translated content --- files/ja/web/api/element/currentstyle/index.html | 50 ------------------------ 1 file changed, 50 deletions(-) delete mode 100644 files/ja/web/api/element/currentstyle/index.html (limited to 'files/ja/web/api/element') diff --git a/files/ja/web/api/element/currentstyle/index.html b/files/ja/web/api/element/currentstyle/index.html deleted file mode 100644 index 24548064d8..0000000000 --- a/files/ja/web/api/element/currentstyle/index.html +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: Element.currentStyle -slug: Web/API/Element/currentStyle -tags: - - API - - NeedsExample - - Non-standard - - Property -translation_of: Web/API/Element/currentStyle ---- -

{{Non-standard_header}}

- -

Element.currentStyle は独自プロパティで、標準化されている {{DOMxRef("window.getComputedStyle()")}} メソッドに似ているものです。古いバージョンの Microsoft Internet Explorer で使用できます。しかし、 window.getComputedStyle() がピクセル数で値を返すのに対し、これは CSS で設定された単位で返します。

- -

ポリフィル

- -
-

このポリフィルは値をピクセル数で返しますが、値を読むたびに {{domxref("window.getComputedStyle()")}} を呼び出さなければならないため、かなり遅くなると思われます。

-
- -
/* すべての著作権をパブリックドメインに寄贈します。
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-if (!("currentStyle" in Element.prototype)) {
-  Object.defineProperty(Element.prototype, "currentStyle", {
-    get: function() {
-      return window.getComputedStyle(this);
-    }
-  });
-}
-
- -

仕様書

- -

どの仕様書にも含まれていません。

- -

Microsoft は MSDN で説明しています

- -

ブラウザーの互換性

- -

{{Compat("api.Element.currentStyle")}}

- -

関連情報

- - - -
{{APIRef("DOM")}}
-- cgit v1.2.3-54-g00ecf