• Robert Knight's avatar
    Add a utility to observe element size changes · e0db3e13
    Robert Knight authored
    Add a utility for use by a new implementation of the `<excerpt>`
    component which observes changes in the size of the DOM output directly.
    
    This uses `ResizeObserver` where available with a fallback to
    `MutationObserver` + selected window events in other browsers.
    e0db3e13
observe-element-size.js 1.83 KB