First draft of multi-document support (including shadow roots) is looking promising for the ResizeObserver polyfill. For those of us who still have to support older browsers, this will hopefully help a lot!
If you're starting out in development and are wondering what to learn. Try to build something you use every day, that's fun and will test you to the max. This way you have to research and learn about all the techniques to get you to your end goal.
So, what would you build?
@KohlerChristian@marcdingena @kreuzercode This depends on browser implementation of the API. I think @atotic mentioned Chrome was more performant using a singular observer and adding multiple elements to it.
@marcdingena@gregwhitworth is there a plan to add backwards compatibility into the resize observer, or, just push with the new specification and fragments?
@marcdingena It's not ideal in this scenario and if Firefox continues to follow the spec closely, there will be the same issue. This check will unfortunately be required.
@marcdingena I think I made a case a while back for just retuning a single size object of the box you're observing, but the team writing the spec wanted the separation to avoid any confusion when multiple observers are used.
@marcdingena Sorry for the late reply, I don't seem to be getting any notifications... I saw previous discussions saying that the entry would contain all sizes as null values, except the one that you're observing. This seemed to change in later discussions to returning all values.