【发布时间】:2015-03-24 20:03:21
【问题描述】:
我们正在尝试让我们的网络应用程序作为全屏网络应用程序运行。我使用这些元标记让它工作:
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="Full Screen">
因此,现在当您从 iPhone 或 Android 设备的主屏幕启动网络应用程序时,它将以全屏模式启动(没有浏览器控件)。
现在我们需要一种允许用户退出的方法,我希望创建一个具有退出按钮的菜单,但使用 window.close() 在 chrome 中出现以下错误:
Scripts may close only the windows that were opened by it.
处理这个问题的正确方法是什么?
【问题讨论】:
标签: javascript android iphone