adaptlearning / adapt-contrib-core

Adapt Framework kernel. Responsible for boot loading, data loading and core APIs.
GNU General Public License v3.0
3 stars 17 forks source link

jquery.resize update to use ResizeObserver instead of manual calculations #576

Closed oliverfoster closed 1 month ago

oliverfoster commented 2 months ago

Subject of the issue

ResizeObserver is now long fully supported https://caniuse.com/resizeobserver

It works in a similar way to MutationObserver, in that it allows well timed callbacks against the browser's rendering lifecycle, giving us the ability to immediately capture resize events as they happen and respond to them in a way that doesn't cause rendering glitches. It is much more performant and much less resource intensive than our current approach of measuring and comparing on expiring intervals and at strategic events.