[英]How can I open a safari link from standalone webapp?
I'm trying to open an html page (I get it as a string
and parse it) from my fullscreen iOS web application (standalone).我正在尝试从我的全屏 iOS Web 应用程序(独立)打开一个 html 页面(我将其作为
string
获取并解析它)。
I tried opening a window ( window.open
) but it doesn't work.我尝试打开一个窗口(
window.open
)但它不起作用。
It involves handling a payment method, so I can't redirect back from their page to mine (it's an illegal hack) when I finish.它涉及处理付款方式,因此当我完成时,我无法从他们的页面重定向回我的页面(这是非法入侵)。
How can I manage opening the html file in safari and going back?如何管理在 safari 中打开 html 文件并返回?
I don't know of a way that a standalone mode web app can serve up raw HTML to the user without it being hosted somewhere.我不知道独立模式的 Web 应用程序可以通过什么方式向用户提供原始 HTML,而无需将其托管在某处。
If you have a genuine web URL though, you can have the user click a link with target="_blank"
(new tab) and it should open in Safari, instead of the standalone browser.但是,如果您有一个真正的 Web URL,您可以让用户单击带有
target="_blank"
(新选项卡)的链接,它应该在 Safari 中打开,而不是在独立浏览器中打开。 I don't think you can do it via window.open(), because it will be silently blocked as a "pop-up".我不认为你可以通过 window.open() 来做到这一点,因为它会作为一个“弹出窗口”被悄悄地阻止。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.