()
| 375 | let _ro: ResizeObserver | null = null |
| 376 | |
| 377 | const get = () => { |
| 378 | if (_ro) { |
| 379 | return _ro |
| 380 | } |
| 381 | |
| 382 | if (!this.targetWindow || !this.targetWindow.ResizeObserver) { |
| 383 | return null |
| 384 | } |
| 385 | |
| 386 | return (_ro = new this.targetWindow.ResizeObserver((entries) => { |
| 387 | entries.forEach((entry) => { |
| 388 | const run = () => { |
| 389 | this._measureElement(entry.target as TItemElement, entry) |
| 390 | } |
| 391 | this.options.useAnimationFrameWithResizeObserver |
| 392 | ? requestAnimationFrame(run) |
| 393 | : run() |
| 394 | }) |
| 395 | })) |
| 396 | } |
| 397 | |
| 398 | return { |
| 399 | disconnect: () => { |
no test coverage detected