()
| 187 | } |
| 188 | |
| 189 | function queuePositionUpdate() { |
| 190 | if (typeof requestAnimationFrame === "undefined") { |
| 191 | updatePositionCache() |
| 192 | return |
| 193 | } |
| 194 | if (positionFrame !== undefined) return |
| 195 | positionFrame = requestAnimationFrame(() => { |
| 196 | positionFrame = undefined |
| 197 | updatePositionCache() |
| 198 | }) |
| 199 | } |
| 200 | |
| 201 | function updatePositionCache() { |
| 202 | if (!viewport) return |
no test coverage detected