trurl-master / jsdom-testing-mocks

A set of tools for emulating browser behavior in jsdom environment
MIT License
116 stars 7 forks source link

[Request] Support `window.visualViewport` #61

Open puglyfe opened 5 days ago

puglyfe commented 5 days ago

VisualViewport is a window property primarily aimed at supporting pinch-zoom interactions. I came across it while debugging an issue with floating-ui. It seems like it would make sense to also mock this property when mocking the viewport. It also has a polyfill, which should make it fairly straightforward to implement.