From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../api/intersectionobserver/unobserve/index.html | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 files/fr/web/api/intersectionobserver/unobserve/index.html (limited to 'files/fr/web/api/intersectionobserver/unobserve') diff --git a/files/fr/web/api/intersectionobserver/unobserve/index.html b/files/fr/web/api/intersectionobserver/unobserve/index.html new file mode 100644 index 0000000000..eb4b731432 --- /dev/null +++ b/files/fr/web/api/intersectionobserver/unobserve/index.html @@ -0,0 +1,74 @@ +--- +title: IntersectionObserver.unobserve() +slug: Web/API/IntersectionObserver/unobserve +tags: + - API + - Intersection Observer + - IntersectionObserver API + - IntersectioonObserver + - Méthode + - Reference +translation_of: Web/API/IntersectionObserver/unobserve +--- +
{{APIRef("Intersection Observer API")}}{{SeeCompatTable}}
+ +

La méthode unobserve() de l'interface {{domxref("IntersectionObserver")}} indique à l'IntersectionObserver de cesser d'observer l'élément cible spécifié.

+ +

Syntaxe

+ +
IntersectionObserver.unobserve(cible);
+ +

Paramètress

+ +
+
cible
+
L'{{domxref("Element")}} à cesser d'observer. Si l'élément spécifié n'est pas en cours d'observation, cette méthode ne fait rien et ne jette pas d'erreur.
+
+ +

Valeur de retour

+ +

undefined.

+ +
+
+ +

Exemples

+ +

Ce bout de code montre simplement la création d'un observateur, l'ajout d'un élément sous observation puis sa fin d'observation.

+ +
let observer = new IntersectionObserver(fonctionRappel);
+observateur.observe(document.getElementById("élémentÀObserver"));
+
+/* ... */
+
+observateur.unobserve(document.getElementById("élémentÀObserver"));
+ +

Spécifications

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

Compatibilité des navigateurs

+ + + +

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

+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf