resize-observer
resize-observer copied to clipboard
Improve Shadow DOM support for Web Components
Currently the library only listens to mutations on the main document level. This means that any non-user actioned DOM changes inside a shadow root will not be noticed.
Most of the time this will not be an issue, as user interaction is usually the main cause for resizing to take place. That being said, there are some circumstances where this will cause issues.
This could be implemented by collecting a list of observable documents, rather than just listening to events on the main document.
https://github.com/clauderic/resize-observer/commit/2e94a3f912306d6fc6820e682084e671f4858260
This will have to be added to the next milestone (v4), as it will probably need to be part of the refactoring effort.
cc: @goremikin
Initial support has been added in the v4.0.0-1 release. Feedback welcome!