resize-observer-polyfill
resize-observer-polyfill copied to clipboard
Changed window/document references to be relative to the target
I have a situation whereby the ResizeObserver is executing in the main window, but the elements that need to be observed for resizing are being drawn in another frame. Therefore, hardcoding window and document references are a non-starter for me - I need to compute them from the element target.
This is my first attempt at this patch and is quite hacky. But it does demonstrate what I'm trying to do here.