From 99efa5cfa34c3f9d38b75352881acdfc99508ebf Mon Sep 17 00:00:00 2001 From: tristantheb Date: Fri, 2 Apr 2021 13:50:14 +0200 Subject: UPDATE: FR-ONLY - Remove all old CompatibilityTable to replace with {{Compat()}} (#311) * UPDATE: Removing CompatibilityTable script - Part 1 * UPDATE: Removing CompatibilityTable script - Part 2 * UPDATE: Removing CompatibilityTable script - Part 3 * UPDATE: Removing CompatibilityTable script - Part 4 * UPDATE: Removing CompatibilityTable script - Part 5/5 * FIX: Repair the EOL of one page * FIX: Fix conflicting file --- files/fr/web/api/element/currentstyle/index.html | 86 ++++++++---------------- 1 file changed, 29 insertions(+), 57 deletions(-) (limited to 'files/fr/web/api/element/currentstyle') diff --git a/files/fr/web/api/element/currentstyle/index.html b/files/fr/web/api/element/currentstyle/index.html index 09a7425ce9..3ac845eaf3 100644 --- a/files/fr/web/api/element/currentstyle/index.html +++ b/files/fr/web/api/element/currentstyle/index.html @@ -1,76 +1,48 @@ --- title: Element.currentStyle slug: Web/API/Element/currentStyle +tags: + - API + - NeedsExample + - Non-standard + - Property translation_of: Web/API/Element/currentStyle --- -
{{APIRef("DOM")}}
+
{{APIRef("DOM")}}{{Non-standard_header}}
-

{{ Non-standard_header() }}

+

Element.currentStyle est une propriété propriétaire qui est similaire à la méthode normalisée {{DOMxRef("window.getComputedStyle()")}}. Elle est disponible dans les anciennes versions de Microsoft Internet Explorer. Cependant, elle renvoie les unités définies dans CSS alors que window.getComputedStyle() renvoie les valeurs en pixels.

-

Summary

+

Prothèse d'émulation

-

Element.currentStyle is a property which is a proprietary similar to the standardized {{domxref("window.getComputedStyle")}} method. It is available in old versions of Microsoft Internet Explorer. However, it returns the units set in CSS while window.getComputedStyle returns the values in pixels.

+
+

Cette prothèse d'émulation retourne les valeurs en pixels et risque d'être plutôt lent, car il doit appeler {{domxref("window.getComputedStyle()")}} chaque fois que sa valeur est lue.

+
-

Specification

+
/* Tout droit d'auteur est dédié au domaine public.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-

Ne fait partie d'aucune spécification.

+if (!("currentStyle" in Element.prototype)) { + Object.defineProperty(Element.prototype, "currentStyle", { + get: function() { + return window.getComputedStyle(this); + } + }); +} +
-

Microsoft a une description MSDN.

+

Spécifications

-

Compatibilité des navigateurs

+

Ne fait partie d'aucune spécification.

-

{{ CompatibilityTable() }}

+

Microsoft a une description MSDN.

-
- - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerMicrosoft EdgeOperaSafari (WebKit)
Basic support{{ CompatNo() }}{{ CompatNo() }}6{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
-
+

Compatibilité des navigateurs

-
- - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{ CompatNo() }}{{ CompatNo() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatNo() }}
-
+

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

-

Voir aussi

+

Voir aussi

-- cgit v1.2.3-54-g00ecf