We already catch direct attribute changes on the container (e.g. el.classList.add()) for resizes, but using the proposed ResizeObserver would catch more cases and would avoid some false positives.
Once the spec is finalised, we can use it with a check for the API's existence. We can fall back on the existing behaviour if ResizeObserver is unavailable.