---
title: IntersectionObserver.disconnect()
slug: Web/API/IntersectionObserver/disconnect
tags:
  - API
  - Disconnect
  - Intersection Observer
  - Intersection Observer API
  - IntersectionObserver
  - Method
  - Reference
translation_of: Web/API/IntersectionObserver/disconnect
---
<div>{{APIRef("Intersection Observer API")}}</div>

<p>La méthode <code><strong>disconnect()</strong></code>, rattachée à l'interface <a href="/fr/docs/Web/API/IntersectionObserver"><code>IntersectionObserver</code></a>, arrête l'observation des changements de visibilité de l'ensemble des éléments cibles.</p>

<h2 id="syntax">Syntaxe</h2>

<pre class="syntaxbox"><var>intersectionObserver</var>.disconnect();</pre>

<h3 id="parameters">Paramètres</h3>

<p>Aucun.</p>

<h3 id="return_value">Valeur de retour</h3>

<p><code>undefined</code>.</p>

<h2 id="specifications">Spécifications</h2>

<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Spécification</th>
      <th scope="col">Statut</th>
      <th scope="col">Commentaire</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        {{SpecName('IntersectionObserver','#dom-intersectionobserver-disconnect','IntersectionObserver.disconnect()')}}
      </td>
      <td>{{Spec2('IntersectionObserver')}}</td>
      <td>Définition initiale.</td>
    </tr>
  </tbody>
</table>

<h2 id="browser_compatibility">Compatibilité des navigateurs</h2>

<p>{{Compat("api.IntersectionObserver.disconnect")}}</p>

<h2 id="see_also">Voir aussi</h2>

<ul>
  <li><a href="/fr/docs/Web/API/IntersectionObserver/observe"><code>observe()</code></a></li>
  <li><a href="/fr/docs/Web/API/IntersectionObserver/unobserve"><code>unobserve()</code></a></li>
</ul>