I'm wondering if an event is fired when the mobile viewport is activated through "Toggle Device Toolbar" in the developer tools.
Asked
Active
Viewed 101 times
0
-
Does this answer your question? [What's the javascript event of window rotate or toggle different device?](https://stackoverflow.com/questions/51666462/whats-the-javascript-event-of-window-rotate-or-toggle-different-device) – Mohit Sharma Jul 19 '22 at 05:08
-
orientationchange is triggered several times in a row but not fired when the mobile view mode is turned off. – smolo Jul 19 '22 at 12:19
-
Other than that, the orientationchange event is deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. – smolo Jul 19 '22 at 12:26