iframe visual studio html5 windows 8 app [英] iframe visual studio html5 windows 8 app

查看:88
本文介绍了iframe visual studio html5 windows 8 app的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在以地铁风格创建我的第一个Windows 8应用程序。
我正在尝试使用iframe for runescape。

I'm creating my first windows 8 app in metro style. I'm trying to do this with a iframe for runescape.

这是我的代码:

    <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Runescape_Metro_Client</title>

    <!-- WinJS references -->
    <link href="//Microsoft.WinJS.2.0/css/ui-dark.css" rel="stylesheet" />
    <script src="//Microsoft.WinJS.2.0/js/base.js"></script>

    <!-- Runescape_Metro_Client references -->
    <link href="/css/default.css" rel="stylesheet" />
    <script src="/js/default.js"></script>
</head>
<body>
    <iframe sandbox="allow-scripts" id="Iframe" src="http://www.runescape.com/game" style="width:100%; height:100%"></iframe>
</body>
</html>

这是我得到的错误:

APPHOST9625:Kan niet navigeren naar:' http://www.runescape.com/游戏
Een iframe heeft geprobeerd om naar een URI te navigeren die niet is
opgenomen in de ApplicationContentUriRules voor deze app。 Gebruik in
plaats daarvan een x-ms-webview-element om de URI te bekijken of voeg
de URI toe aan de ApplicationContentUriRules-sectie van het
pakketmanifest,zodat het iframe daarnaartoe kan navigeren。 (Voeg in
Visual Studio deze URI toe aan het tabblad Content URIs van de
Manifest Designer。)

APPHOST9625: Kan niet navigeren naar: 'http://www.runescape.com/game'. Een iframe heeft geprobeerd om naar een URI te navigeren die niet is opgenomen in de ApplicationContentUriRules voor deze app. Gebruik in plaats daarvan een x-ms-webview-element om de URI te bekijken of voeg de URI toe aan de ApplicationContentUriRules-sectie van het pakketmanifest, zodat het iframe daarnaartoe kan navigeren. (Voeg in Visual Studio deze URI toe aan het tabblad Content URIs van de Manifest Designer.)

(用谷歌翻译成英文翻译是:

(translated to english with google translate it is:


APPHOST9625:无法导航到: http://www.runescape.com/game 。一个iframe尝试导航,但不包含在此应用的ApplicationContentUriRules中。使用x-ms-webview元素来查看URI是否将URI添加到包清单的ApplicationContentUriRules部分,因此iframe将在那里进行导航。(在Visual Studio中将此URI写入清单设计器URI的内容选项卡。 )

APPHOST9625: Can not navigate to: http://www.runescape.com/game. An iframe has tried to navigate that is not included in the ApplicationContentUriRules for this app. To a URI Instead, use an x-ms-webview element to see if the URI add the URI to the ApplicationContentUriRules section of the package manifest, so the iframe go there to navigate. (Write in Visual Studio this URI to the Content tab of the Manifest Designer URIs.)

Google没有帮助,所以我在这里问它。

Google didnt help so thats why i am asking it here.

推荐答案

对于Windows 8.1应用程序,您不能再将iframe用于非安全的http URI。您将在问题中获得错误消息您可以将URI添加到ApplicationContentUriRules,但它只允许您将https URI添加到规则中。

For Windows 8.1 apps, you can no longer use an iframe for non-secure http URIs. You will get the error message in the question which suggests that you can just add your URI to ApplicationContentUriRules, but it will only allow you to add https URIs to the rules.

因此您必须使用专有的< x-ms-webview> 标记而不是< iframe> 如果您想要提供来自您的非安全内容应用程序。 (例如< x-ms-webview src =http://www.google.com>

So you will have to use the proprietary <x-ms-webview> tag instead of <iframe> if you want to serve non-secure content from your app. (e.g. <x-ms-webview src="http://www.google.com">)

请参阅 http://www.kraigbrockschmidt。 com / 2014/01/13 / frame-to-webview-part-one /

这篇关于iframe visual studio html5 windows 8 app的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆