PhoneGap + Childbrowser +错误

时间:2012-10-22 05:55:02

标签: javascript android cordova phonegap-plugins childbrowser

我正在尝试在我的应用程序中使用Childbrowser插件。我的代码如下:

ChildBrowser.prototype.showWebPage = function(url, options) {
    options = options || {
        showLocationBar: true,
        locationBarAlign: "top"
    };
    //Code Runs up to this point
    cordova.exec(this._onEvent, this._onError, "ChildBrowser", "showWebPage", [url, options]);
};

代码的最后一行什么也没做。它没有给出任何错误,但网页没有显示。我使用的是Android 2.3。

1 个答案:

答案 0 :(得分:2)

你似乎错误地定义了这个,我认为它应该是这样的:

var url = "http://www.google.com";

window.plugins.childBrowser.showWebPage( url, {showLocationBar: true});// This opens the webpage.

我不明白为什么你使用ChildBrowser.prototype.showWebPage

相关问题