All the cited examples show this as the correct code:
window.plugins.childBrowser.showWebPage( "http://www.someurl.com" );
However, "window.plugins.childBrowser" is null, whilst this is not:
window.plugins.ChildBrowser
Unsurprising perhaps when one considers that this is the last code in childbrowser.js:
cordova.addConstructor(function () {
if (!window.plugins) {
window.plugins = {};
}
window.plugins.ChildBrowser = new ChildBrowser();
});
(extra information about this under the line below)
However, although the ChildBrowser property in this line has a value:
window.plugins.ChildBrowser.showWebPage( "http://www.someurl.com" );
It still doesn't do anything.
Huh?
ChildBrowser.showWebPage() looks like this btw:
ChildBrowser.prototype.showWebPage = function (url, options) {
if (!options) {
options = { showLocationBar: true };
}
cordova.exec(onEvent, onError, "ChildBrowser", "showWebPage", [url, options]);
};
ps: Cordova 3.0.0, XCode 4.6.3, ChildBrowser 5.0.0. The official plugin page at https://build.phonegap.com/plugins/480 claims that ChildBrowser 5.0.0 is supported by Cordova 3.0.0
Just to check that window.plugins ref, I ran this loop:
console.log( "loop starts..." );
for ( var propt in window.plugins ) {
console.log( "propt " + propt );
}
console.log( "loop ends." );
And it produced this:
[Log] loop starts...
[Log] propt ChildBrowser
[Log] loop ends.