From c05efa8d7ae464235cf83d7c0956e42dc6974103 Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:14 +0200 Subject: move *.html to *.md --- .../naturalheight/index.html | 64 ---------------------- .../naturalheight/index.md | 64 ++++++++++++++++++++++ 2 files changed, 64 insertions(+), 64 deletions(-) delete mode 100644 files/fr/web/api/performanceelementtiming/naturalheight/index.html create mode 100644 files/fr/web/api/performanceelementtiming/naturalheight/index.md (limited to 'files/fr/web/api/performanceelementtiming/naturalheight') diff --git a/files/fr/web/api/performanceelementtiming/naturalheight/index.html b/files/fr/web/api/performanceelementtiming/naturalheight/index.html deleted file mode 100644 index 204efdc562..0000000000 --- a/files/fr/web/api/performanceelementtiming/naturalheight/index.html +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: PerformanceElementTiming.naturalHeight -slug: Web/API/PerformanceElementTiming/naturalHeight -tags: - - API - - Property - - Propriété - - Reference - - naturalHeight - - PerformanceElementTiming -translation_of: Web/API/PerformanceElementTiming/naturalHeight ---- -
{{APIRef("Element Timing API")}}
- -

La propriété en lecture seule naturalHeight de l'interface PerformanceElementTiming renvoie la hauteur intrinsèque de l'élément image.

- -

Syntaxe

- -
var height = PerformanceElementTiming.naturalHeight;
- -

Valeur

-

Un entier de 32 bits non signé (unsigned long) qui est la hauteur intrinsèque de l'image si cela est appliqué à une image, 0 pour le texte.

- -

Exemples

- -

Dans cet exemple, le fichier image a une largeur de 1000px et une hauteur de 750px. L'appel de entry.naturalHeight renvoie 750, c'est-à-dire la hauteur intrinsèque en pixels.

- -
<img src="image.jpg" alt="une belle image" elementtiming="big-image" id="myImage">
- -
const observer = new PerformanceObserver((list) => {
-  let entries = list.getEntries().forEach(function (entry) {
-    if (entry.identifier === "big-image") {
-      console.log(entry.naturalHeight);
-    }
-  });
-});
-observer.observe({ entryTypes: ["element"] });
- -
-

Note : Cet exemple utilise l'interface PerformanceObserver pour créer une liste d'événements de mesure des performances. Dans notre cas, nous observons l'élément PerformanceEntry.entryType afin d'utiliser l'interface PerformanceElementTiming.

-
- -

Specifications

- - - - - - - - - - - - - - - - -
SpécificationStatutCommentaire
{{SpecName('Element Timing API','#dom-performanceelementtiming-naturalheight','PerformanceElementTiming.naturalHeight')}}{{Spec2('Element Timing API')}}Initial definition.
- -

Compatibilité des navigateurs

- -

{{Compat("api.PerformanceElementTiming.naturalHeight")}}

diff --git a/files/fr/web/api/performanceelementtiming/naturalheight/index.md b/files/fr/web/api/performanceelementtiming/naturalheight/index.md new file mode 100644 index 0000000000..204efdc562 --- /dev/null +++ b/files/fr/web/api/performanceelementtiming/naturalheight/index.md @@ -0,0 +1,64 @@ +--- +title: PerformanceElementTiming.naturalHeight +slug: Web/API/PerformanceElementTiming/naturalHeight +tags: + - API + - Property + - Propriété + - Reference + - naturalHeight + - PerformanceElementTiming +translation_of: Web/API/PerformanceElementTiming/naturalHeight +--- +
{{APIRef("Element Timing API")}}
+ +

La propriété en lecture seule naturalHeight de l'interface PerformanceElementTiming renvoie la hauteur intrinsèque de l'élément image.

+ +

Syntaxe

+ +
var height = PerformanceElementTiming.naturalHeight;
+ +

Valeur

+

Un entier de 32 bits non signé (unsigned long) qui est la hauteur intrinsèque de l'image si cela est appliqué à une image, 0 pour le texte.

+ +

Exemples

+ +

Dans cet exemple, le fichier image a une largeur de 1000px et une hauteur de 750px. L'appel de entry.naturalHeight renvoie 750, c'est-à-dire la hauteur intrinsèque en pixels.

+ +
<img src="image.jpg" alt="une belle image" elementtiming="big-image" id="myImage">
+ +
const observer = new PerformanceObserver((list) => {
+  let entries = list.getEntries().forEach(function (entry) {
+    if (entry.identifier === "big-image") {
+      console.log(entry.naturalHeight);
+    }
+  });
+});
+observer.observe({ entryTypes: ["element"] });
+ +
+

Note : Cet exemple utilise l'interface PerformanceObserver pour créer une liste d'événements de mesure des performances. Dans notre cas, nous observons l'élément PerformanceEntry.entryType afin d'utiliser l'interface PerformanceElementTiming.

+
+ +

Specifications

+ + + + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName('Element Timing API','#dom-performanceelementtiming-naturalheight','PerformanceElementTiming.naturalHeight')}}{{Spec2('Element Timing API')}}Initial definition.
+ +

Compatibilité des navigateurs

+ +

{{Compat("api.PerformanceElementTiming.naturalHeight")}}

-- cgit v1.2.3-54-g00ecf