托管Web应用程序创建一个弹出窗口,然后崩溃 [英] Hosted Web App creates a popup, then crashes
问题描述
我最近使用Windows App Studio模板为http://m.washingtontimes.com/创建了一个托管网络应用程序来测试它。
当我在桌面上启动应用程序时,它运行良好,直到您点击文章,之后应用程序打开另一个窗口然后崩溃。
出现此问题的原因是,在实际网站上,它会打开弹出广告。但是,当它试图在Windows应用程序中打开弹出窗口时,应用程序崩溃。
有没有办法阻止弹出广告?我如何解决这个问题?
谢谢。
如果您拥有网络,则可以阻止然后使用js
if(Windows类型!=='undefined'){
//此代码将在HWA中执行,因此您可以在此处阻止
}
I recently created a hosted web app just to test it, for http://m.washingtontimes.com/ using the Windows App Studio template.
When I launch the app on my desktop, it runs well, until you click an article, after which the app opens another window and then crashes.
The reason for this problem is, on the actual website, it opens popup advertisements. However, when it tries to open popups within the Windows app, the app crashes.
Is there any way to block the popup advertisements? How do I fix this problem?
Thank you.
If you own the web you can block then using js
if (typeof Windows !== 'undefined'){
//This code will be executed in a HWA, so you can block here
}
这篇关于托管Web应用程序创建一个弹出窗口,然后崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!