aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/intersectionobserver/disconnect/index.html
blob: 0e4513516e9b0daad9fe6056decc948b792f5f01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
title: IntersectionObserver.disconnect()
slug: Web/API/IntersectionObserver/disconnect
tags:
  - API
  - Disconnect
  - IntersectionObserver
  - Method
translation_of: Web/API/IntersectionObserver/disconnect
---
<div>{{APIRef("Intersection Observer API")}}</div>

<div> {{domxref("IntersectionObserver")}} 的<code>disconnect()</code>方法终止对所有目标元素可见性变化的观察。</div>

<h2 id="语法">语法</h2>

<pre class="syntaxbox"><em>IntersectionObserver</em>.disconnect();</pre>

<h3 id="参数">参数</h3>

<p>None.</p>

<h3 id="返回值">返回值</h3>

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

<h2 id="说明">说明</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('IntersectionObserver','#dom-intersectionobserver-disconnect','IntersectionObserver.disconnect()')}}</td>
   <td>{{Spec2('IntersectionObserver')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性 </h2>

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

<h2 id="See_also">See also</h2>

<ul>
 <li>{{domxref("IntersectionObserver.observe", "observe()")}}</li>
 <li>{{domxref("IntersectionObserver.unobserve", "unobserve()")}}</li>
</ul>