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 --- .../naturalwidth/index.html | 63 ---------------------- .../performanceelementtiming/naturalwidth/index.md | 63 ++++++++++++++++++++++ 2 files changed, 63 insertions(+), 63 deletions(-) delete mode 100644 files/fr/web/api/performanceelementtiming/naturalwidth/index.html create mode 100644 files/fr/web/api/performanceelementtiming/naturalwidth/index.md (limited to 'files/fr/web/api/performanceelementtiming/naturalwidth') diff --git a/files/fr/web/api/performanceelementtiming/naturalwidth/index.html b/files/fr/web/api/performanceelementtiming/naturalwidth/index.html deleted file mode 100644 index 3e254d3289..0000000000 --- a/files/fr/web/api/performanceelementtiming/naturalwidth/index.html +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: PerformanceElementTiming.naturalWidth -slug: Web/API/PerformanceElementTiming/naturalWidth -tags: - - API - - Property - - Propriété - - Reference - - naturalWidth - - PerformanceElementTiming -translation_of: Web/API/PerformanceElementTiming/naturalWidth ---- -
{{APIRef("Element Timing API")}}
- -

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

-

Syntax

- -
var width = PerformanceElementTiming.naturalWidth;
- -

Valeur

-

Un entier de 32 bits non signé (unsigned long) qui est la largeur 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.naturalWidth renvoie 1000, c'est-à-dire la largeur 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.naturalWidth);
-    }
-  });
-});
-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-naturalwidth','PerformanceElementTiming.naturalWidth')}}{{Spec2('Element Timing API')}}Définition initiale.
- -

Compatibilité des navigateurs

- -

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

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

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

+

Syntax

+ +
var width = PerformanceElementTiming.naturalWidth;
+ +

Valeur

+

Un entier de 32 bits non signé (unsigned long) qui est la largeur 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.naturalWidth renvoie 1000, c'est-à-dire la largeur 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.naturalWidth);
+    }
+  });
+});
+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-naturalwidth','PerformanceElementTiming.naturalWidth')}}{{Spec2('Element Timing API')}}Définition initiale.
+ +

Compatibilité des navigateurs

+ +

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

-- cgit v1.2.3-54-g00ecf