You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 30, 2018. It is now read-only.
We might want to consider using a ResizeObserver polyfill to allow the Dimensions meta manager to perform better, allowing it to detect changes to DOM elements that change the size information of a DOM element.
The draft spec is available at WICG ResizeObserver Draft. A well thought out polyfill is available at que-etc/resize-observer-polyfill which uses MutationObservers and Mutation Events to provide spec compliant functionality with some minor limitations.
Right now, every time a widget is re-rendered, any nodes that are registered with the Dimensions meta manager will have their bounding rectangle re-calculated, whether it has actually been changed. This would allow the manager to be more reactive and keep a cache of size information, of which its observed DOM elements would have their values updated on actual resize.
Because the polyfill is designed to deliver the resize changes only when it is convinced it has the right information, there could be an issue where the queuing of changes get delivered after the DOM has be re-rendered after an invalidation, either causing a double invalidation or incorrect information being offered up to the widgets. This would require investigation to help ensure that it operates effectively.