在 iPhone、iPad 等设备上运行的 safari 中捕获浏览器关闭事件
我如何在 iPhone、iPad、itouch 等设备上运行的 safari 中捕获浏览器关闭事件,因为 onbeforeunload 事件不适用于 safari?
非常感谢, 哈里普拉萨
How do i capture the browser closing event in safari running in iPhone ,iPad, itouch etc. as the onbeforeunload event will not work with safari?
Many thanks,
Hariprasath
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
iOS 版 Safari 支持 unload 事件,这应该可以解决问题。您可以在此处找到有关支持的 Safari for iOS 事件的更多信息:
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
希望有所帮助。
Safari for iOS supports the unload event, which should do the trick. You can find out more information about supported Safari for iOS events here:
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
Hope that helps.