From 69d118500cccd88ca649d8bd12cf02019cd33a6d Mon Sep 17 00:00:00 2001 From: tristantheb Date: Sun, 11 Apr 2021 18:40:27 +0200 Subject: FIX: Update all FR content of the IntersectionObserver interface - Issue #409 (#410) * FIX: Update and fix all pages, remove old KS, update id-attr, replace content, translate missing strings * FIX: Fix some old text typo * Review - IntersectionObserver interface - rewordings and minor fixes * Review - IntersectionObserver.IntersectionObserver constructor - rewordings * Review - IntersectionObserver.observe - minor rewordings * Review - IntersectionObserver.root - rewordings * Review - IntersectionObserver.rootMargin - rewordings * Review - IntersectionObserver.thresholds - rewordings * Review - IntersectionObserver.unobserve - minor rewordings Co-authored-by: julieng --- .../api/intersectionobserver/thresholds/index.html | 71 ++++++++++------------ 1 file changed, 31 insertions(+), 40 deletions(-) (limited to 'files/fr/web/api/intersectionobserver/thresholds') diff --git a/files/fr/web/api/intersectionobserver/thresholds/index.html b/files/fr/web/api/intersectionobserver/thresholds/index.html index 1ec8f5c0a8..ec430bdedb 100644 --- a/files/fr/web/api/intersectionobserver/thresholds/index.html +++ b/files/fr/web/api/intersectionobserver/thresholds/index.html @@ -3,64 +3,55 @@ title: IntersectionObserver.thresholds slug: Web/API/IntersectionObserver/thresholds tags: - API + - Draft - Intersection Observer - Intersection Observer API - IntersectionObserver - - Propriété + - NeedsExample + - Property + - Reference translation_of: Web/API/IntersectionObserver/thresholds --- -
{{APIRef("Intersection Observer API")}}{{draft}}{{SeeCompatTable}}
+
{{APIRef("Intersection Observer API")}}
-

La propriété en lecture seule thresholds de l'interface {{domxref("IntersectionObserver")}} retourne la liste des seuils d'intersection spécifiés lorsque l'observateur a été instancié avec {{domxref("IntersectionObserver.IntersectionObserver", "IntersectionObserver()")}}. Si un unique ratio seuil a été donné comme valeur numérique à l'instanciation de l'objet, cette valeur sera un tableau contenant uniquement cette valeur.

+

La propriété en lecture seule thresholds de l'interface IntersectionObserver retourne la liste des seuils d'intersection spécifiés lors de l'instanciation avec IntersectionObserver(). Si un seul seuil a été fourni lors de l'instanciation de l'objet, cette propriété sera un tableau contenant cette unique valeur numérique.

-

Voir {{SectionOnPage("/fr-FR/docs/Web/API/Intersection_Observer_API", "Thresholds")}} pour apprendre comment fonctionnent les seuils d'intersection.

+

Voir la section sur les seuils pour apprendre comment fonctionnent les seuils d'intersection.

-

Syntaxe

+

Syntaxe

-
let thresholds = IntersectionObserver.thresholds;
-
+
thresholds = IntersectionObserver.thresholds;
-

Valeur

+

Valeur

-

Un tableau de seuils d'intersection, originellement spécifié au moyen de la propriété threshold à l'instanciation d'un observateur. Si un unique observateur a été spécifié, sans être donné dans un tableau (valeur numérique), cette valeur se traduite comme un tableau d'un élément la contenant. Quelque fut l'ordre de votre tableau original de threshold, il sera trié par ordre croissant.

+

Un tableau de seuils d'intersection, spécifiés lors de l'instanciation via options.threshold. Si un seul seuil a été fourni, sans être donné dans un tableau (avec une valeur numérique « brute » donc), la valeur de la propriété sera un tableau contenant cette unique valeur. Quel qu'ait été l'ordre du tableau fourni à l'origine, celui fournit par thresholds sera trié par ordre croissant.

-

Si aucune option threshold n'est donnée lorsque IntersectionObserver() est utilisé pour instantier l'observateur, la valeur de thresholds est par défaut définie à [0].

+

Si aucune option threshold n'est fournie lors de l'instanciation avec IntersectionObserver(), la valeur par défaut de thresholds est définie à [0].

-
-

Attention! Bien que l'objet d'options que vous pouvez spécifier lorsque vous créez un {{domxref("IntersectionObserver")}} a un champ nommé {{domxref("IntersectionObserver.threshold", "threshold")}}, cette propriété-ci s'appelle thresholds. Cela peut porter à confusion. Si vous utilisez thresholds par erreur comme nom du champ votre objet d'options, le tableau de thresholds va se retrouver égal à [0.0], ce qui n'est probablement pas ce à quoi vous vous attendiez. Le déboguage n'en sera que plus chaotique.

+
+

Attention !

+

Bien que l'objet d'options qu'on peut spécifier à la création d'un IntersectionObserver possède une propriété champ nommée threshold, cette propriété-ci s'appelle thresholds (avec un « s » supplémentaire donc). Cela peut porter à confusion. Si vous utilisez thresholds par erreur comme nom pour la propriété de l'objet options, le tableau porté par thresholds va se retrouver égal à [0.0], ce qui n'est probablement pas ce à quoi vous vous attendiez. Le déboguage n'en sera que plus chaotique.

-

Exemple

- -
// Instanciation d'un observateur, c'est l'objet d'options qui contient le tableau des seuils (propriété threshold)
-observateur = new IntersectionObserver(fonctionRappel, optionsObservateur)
-
- -

Puis faire simplement :

- -
observateur.thresholds
- -

Pour afficher la liste des seuils fournie à l'initialisation.

- -

Spécifications

+

Spécifications

- - - - - - - - - - - - + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('IntersectionObserver', '#dom-intersectionobserver-thresholds', 'IntersectionObserver.thresholds')}}{{Spec2('IntersectionObserver')}}Initial definition
SpécificationStatutCommentaire
{{SpecName('IntersectionObserver', '#dom-intersectionobserver-thresholds', 'IntersectionObserver.thresholds')}}{{Spec2('IntersectionObserver')}}Définition initiale.
-

Compatibilité des navigateurs

- - +

Compatibilité des navigateurs

{{Compat("api.IntersectionObserver.thresholds")}}

-- cgit v1.2.3-54-g00ecf