是否可以在 phoneGap 中嵌入“X-Frame-Options: SAMEORIGIN”网站?

is it possible to embed a 'X-Frame-Options: SAMEORIGIN" website in phoneGap?

有没有办法在 phonegap 中创建一个 ("X-Frame-Options: SAMEORIGIN") 网站:

或者换句话说:我想在我的 phonegap 应用程序中嵌入 google.com:这可能吗? (我试过 iframe 但没办法)

(我用的是intel SDK人行横道)

您可以使用Cordova In-App-Browser 插件打开外部网站。这将弹出一个模式 window,其中包含您指定的网站。

下面是打开 google.com 的示例代码,确保您已经检查了来自 Intel XDK -> 项目设置 -> 插件

的 "In App Browser" 插件
<!DOCTYPE html>
<html>
    <head>
        <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=no">
        <script src="cordova.js"></script>
        <script>   
function openIAB(){
    var url = "http://google.com";
    window.open(url, "_blank", "location=yes");
}            
        </script>    
    </head>
    <body>
        <button onclick="openIAB()">Open Google</button>
    </body>
</html>

In App Browser cordova 插件的文档:https://github.com/apache/cordova-plugin-inappbrowser