JS event to see if Mobile Safari has been closed?

依然范特西╮ 提交于 2019-12-13 02:33:04

问题


Is there a JS event that gets triggered if a user closes Safari on their iPhone? onunload works if a person leaves a page, but is not called when the browser is closed.

My hunch is, no, there is no event triggered, as closing Mobile Safari merely 'minimizes' it rather than actually closes it. Can anyone confirm?


回答1:


Not exactly, but look in the comments for the pagehide event: What event fires when a WebKit WebApp is "terminated"



来源:https://stackoverflow.com/questions/5554479/js-event-to-see-if-mobile-safari-has-been-closed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!