()
| 85 | |
| 86 | const observer = new targetWindow.ResizeObserver((entries) => { |
| 87 | const run = () => { |
| 88 | const entry = entries[0] |
| 89 | if (entry?.borderBoxSize) { |
| 90 | const box = entry.borderBoxSize[0] |
| 91 | if (box) { |
| 92 | handler({ width: box.inlineSize, height: box.blockSize }) |
| 93 | return |
| 94 | } |
| 95 | } |
| 96 | handler(element.getBoundingClientRect()) |
| 97 | } |
| 98 | |
| 99 | instance.options.useAnimationFrameWithResizeObserver |
| 100 | ? requestAnimationFrame(run) |
no test coverage detected