From 209f9a4970fdc419967c145b82939dbfd9949b70 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sun, 15 Aug 2021 00:41:16 +0900 Subject: orphaned/Web/API/Element/currentStyle を削除 (#1952) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 英語版で削除されているため --- .../web/api/element/currentstyle/index.html | 51 ---------------------- 1 file changed, 51 deletions(-) delete mode 100644 files/ja/orphaned/web/api/element/currentstyle/index.html (limited to 'files/ja/orphaned/web/api/element') diff --git a/files/ja/orphaned/web/api/element/currentstyle/index.html b/files/ja/orphaned/web/api/element/currentstyle/index.html deleted file mode 100644 index 5f1cfa645e..0000000000 --- a/files/ja/orphaned/web/api/element/currentstyle/index.html +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Element.currentStyle -slug: orphaned/Web/API/Element/currentStyle -tags: - - API - - NeedsExample - - Non-standard - - Property -translation_of: Web/API/Element/currentStyle -original_slug: 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