API async theo dõi khi element xuất hiện/biến mất khỏi viewport.
- Thay thế scroll event listener (tốn performance).
- Dùng cho lazy loading images, infinite scroll, trigger animations khi element visible.
An async API that watches when an element enters or leaves the viewport.
- Replaces scroll event listeners (which are expensive on performance).
- Used for lazy loading images, infinite scroll, and triggering animations when elements become visible.