How to determine the rotation state of the screen?
I am writing an implementation of an orientationchangeend
event.
To determine the end orientationchange
, I track the state window.innerWidth
and window.innerHeight
after the event orientationchange
was fired. If these values ββdon't change for the X
number of iterations (using setInterval
), I run orientationchangeend
.
Is there another variable I could track instead of window.innerWidth
/ window.innerHeight
that is more specific? Does it rotate anywhere in the API? (for example, a CSS transform that rotates the screen, assuming there is one).
No one has answered this question yet
Check out similar questions: