Back to Content

IntersectionObserver: disconnect() method

files/en-us/web/api/intersectionobserver/disconnect/index.md

latest531 B
Original Source

{{APIRef("Intersection Observer API")}}

The disconnect() method of the {{domxref("IntersectionObserver")}} interface stops the observer watching all of its target elements for visibility changes.

Syntax

js-nolint
disconnect()

Parameters

None.

Return value

None ({{jsxref("undefined")}}).

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{domxref("IntersectionObserver.observe", "observe()")}}
  • {{domxref("IntersectionObserver.unobserve", "unobserve()")}}