()
| 329 | // Save scroll position to history state when scrolling stops. |
| 330 | let scrollSaveTimeout: ReturnType<typeof setTimeout> | null = null; |
| 331 | function onScroll() { |
| 332 | if (scrollSaveTimeout) { |
| 333 | clearTimeout(scrollSaveTimeout); |
| 334 | } |
| 335 | scrollSaveTimeout = setTimeout(saveScrollPosition, 150); |
| 336 | } |
| 337 | |
| 338 | window.addEventListener('scroll', onScroll, {passive: true, capture: true}); |
| 339 |
nothing calls this directly
no outgoing calls
no test coverage detected