打开新的浏览器窗口,或将焦点设置到现有浏览器

发布于 2024-09-05 21:18:33 字数 409 浏览 2 评论 0原文

我正在使用类似于以下的代码: http://blog.flexexamples.com /2007/08/29/launching-new-browser-windows-from-flex/

我有一个在 AIR 中运行的 Flex 应用程序,当我单击某个 URL 时,它会在我现有的浏览器中打开一个新选项卡。除此之外,焦点不会设置到浏览器。这意味着我不知道浏览器中打开的 URL,除非我实际上将焦点从应用程序更改为浏览器。

是否可以打开一个全新的浏览器,或者将焦点更改为浏览器,以便对用户来说真的很明显?

谢谢。

I'm using code similar to the following:
http://blog.flexexamples.com/2007/08/29/launching-new-browser-windows-from-flex/

I have a Flex app running in AIR, and when I click on a URL it opens a new tab in my existing browser. In addition to this the focus doesn't set to the browser. What this means is that I'm not aware of the URL opening in the browser unless I actually change focus from the app to the browser.

Is it possible to open a brand new spanking browser, or change focus to the browser so its really obvious to the user?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

╭ゆ眷念 2024-09-12 21:18:33

在 AIR/Flex 中您无能为力来实现这一点。您看到的行为是由于操作系统和浏览器设置造成的。在 AIR 中,navigateToURL 只是将 URL 传递给操作系统,操作系统根据默认值处理 URL。

如果我没记错的话,我安装的 Firefox 默认情况下会在新选项卡中打开,但我使用了一些设置使其始终在新窗口中打开。不过,快速谷歌搜索并没有给我答案。

There is nothing you can do in AIR / Flex to make this happen. The behavior your seeing is due to operating system and browser settings. In AIR, navigateToURL just passes the URLtot he OS which handles the URL based on defaults.

If memory serves me, my firefox install ued to open in a new tab by default, but there was some setting I used to make it always open in a new window. Quick googling did not provide me the answer, though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文