javascript - PhoneGap + child 浏览器 + 错误

标签 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。

最佳答案

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

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

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

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

关于javascript - PhoneGap + child 浏览器 + 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13005659/

相关文章:

ios - 如何创建 PhoneGap 插件 iOS

javascript - 如何从多行选择下拉框中自动填充输入文本?

javascript - 事件发生后更新 html 上的 javascript 变量 - Reactjs

javascript - 在网页上自动移动对象

android - react-native-video [android] undefined 不是对象(评估 NativeModuels.UIManager.RCTVideo.Constants')

javascript - 如何在phonegap网站提交插件?

javascript - 如何在javascript中获取字符串中的撇号

android - 我的 Android Studio 无法识别我的智能手机

android - finditem() 找不到菜单,卡在 NullPointerException

android - Phonegap Android YouTube视频流