mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-21 02:06:00 +00:00
6 lines
201 B
TypeScript
6 lines
201 B
TypeScript
export function scheduleConnectedMeasure<T extends HTMLElement>(element: T, measure: (element: T) => void) {
|
|
return requestAnimationFrame(() => {
|
|
if (element.isConnected) measure(element)
|
|
})
|
|
}
|