Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
`ResizeObserver` for more automatic `cy.resize()`s #1652
We already catch direct attribute changes on the container (e.g.
Once the spec is finalised, we can use it with a check for the API's existence. We can fall back on the existing behaviour if
Thanks. That would allow for an easier transition when it's supported natively in the browsers. However, it seems like the
- The `ResizeObserver` is used on top of existing methods. If your browser supports it, you get better coverage for more automatic resizes. If not, you get the existing methods -- which work for common cases. If you only support evergreen browsers, then you probably will never have to call `cy.resize()` in a typical app. - This may help in cases where a programmer puts a graph within an in-page tab interface or within a resizable panel. The viewport should update automatically, so long as the component is compatible with `ResizeObserver`. - Browser support: Edge 76+, Firefox 69+, Chrome 64+, Safari 13+ Ref : `ResizeObserver` for more automatic `cy.resize()`s #1652