Open yaquawa opened 4 years ago
ResizeSensor.js does use the Mutation Observer API, the problem is that mutations are a bad fit for resize events.
Instead I think you'll want to use a Resize Observer - but there's no support for IE and limited Firefox support.
Hi @SlimerDude , I mean if ResizeSensor.js is not detected, fallback to use MutationObserver or as you said the Resize Observer if browser supports. Chances are many people like me don't support IE, so no need to use ResizeSensor.js at all, it increase the bundle size a lot.
Currently I can use Mutation Observer to call the update method of sticky-sidebar when the content of the sidebar changed, but I would like see this tiny logic could be sit in the core in the first place.
I use this library in many of my projects, I really appreciate your great work, and hope this little change can be added to the core. Thanks.
I think to use ResizeSensor.js is a bit overkill, why not just add a few lines to use MutationObserver instead ? (if the browser supports)