Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const watcher = new IntersectionObserver(onEnterView)
- const lazyImages = document.querySelectorAll('img.lazy')
- for (let image of lazyImages) {
- watcher.observe(image) // 開始監視
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement