开发者

Check if page added To iPhone homescreen

开发者 https://www.devze.com 2023-02-07 12:51 出处:网络
Is it possible to check using JavaScript or CSS if a page has been added to the iPhone homescreen in webapp mode. Like getting the height of the screen which wouldn\'t have the na开发者_高级运维v bar

Is it possible to check using JavaScript or CSS if a page has been added to the iPhone homescreen in webapp mode. Like getting the height of the screen which wouldn't have the na开发者_高级运维v bar so would be 460px


You're looking for window.navigator.standalone (mentioned by Apple here)

This won't tell you if the page has been added to the homescreen if it is being visited in the regular browser, but it will tell you if it has been launched from the homescreen.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号