We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
检测浏览器是否支持横屏,window.orientation 已经不建议使用。并且在现代浏览器中,即使 'orientation' in window 返回false,window 实际上也可以绑定 orientationchange 事件。有一个实验性的特性,但是并没有被 Safari 支持。另外,参照这里,'ondevicemotion' in window 在 Chrome/FF 下是可以正确检测的。 希望检测的方法能完善一下。
'orientation' in window
window
orientationchange
'ondevicemotion' in window
The text was updated successfully, but these errors were encountered:
'orientation' in window || 'orientation' in window.screen 这样就可以了吧
'orientation' in window || 'orientation' in window.screen
ondevicemotion是检测手机方向的 和这个不一样
Sorry, something went wrong.
93537c7
No branches or pull requests
检测浏览器是否支持横屏,window.orientation 已经不建议使用。并且在现代浏览器中,即使
'orientation' in window
返回false,window
实际上也可以绑定orientationchange
事件。有一个实验性的特性,但是并没有被 Safari 支持。另外,参照这里,'ondevicemotion' in window
在 Chrome/FF 下是可以正确检测的。希望检测的方法能完善一下。
The text was updated successfully, but these errors were encountered: