use MutationObserver in DOMMetrics rather than window.resize