UNPKG

wx-svelte-grid

Version:

A powerful and flexible DataGrid component written in Svelte

14 lines (11 loc) 236 B
export function onresize(node, handler) { const ro = new ResizeObserver(data => { requestAnimationFrame(() => handler(data[0].contentRect)); }); ro.observe(node.parentNode); return { destroy() { ro.disconnect(); }, }; }