spaniel
spaniel copied to clipboard
Reduce requestAnimationFrame polling
- [x] Add a short gap (< 50ms) between
requestAnimationFramepolls - [x] Only polyfill
IntersectionObserverwhen necessary - [ ] Via a host interface, provide a higher-order function that is passed a function that gets called anytime the DOM is updated. This guarantees that viewport status changes must occur either after this function call, on scroll, or on resize. Thus we don't have to poll and can use passive listeners on scroll and resize.