Reputation: 466
When using phonegap to make an iOS app, can the ChildBrowser plugin open a remote page which can use phonegap functions?
For example: index.html in the phonegap app, calls childbrowser.showwebpage("http://www.website.com"); Can that www.website.com use phonegap functionality?
Or is it only possible with pages in the phonegap/www directory?
Upvotes: 0
Views: 794
Reputation: 2615
Try this...
try {
var url="www.webpage.com";
//both of these should work...
//window.plugins.childBrowser.showWebPage(url);
var CBrowser = new ChildBrowser();
CBrowser.showWebPage(url);
}catch (err) {
console.log("Error:"+err);
}
Upvotes: 0
Reputation: 506
Since childbrowser is actually a native UIWebView (on iOS, idk about Android), you have all the benefits of the nitro javascript engine (as of June '11). That means the page/website you are loading can run it's own javascript code. However, the PhoneGap middleware is bootstrapped in the app itself and since UIWebView is native, I don't see how you could use any PhoneGap functionality unless you wrote a plugin to do just that. I may be completely wrong here though...
EDIT: See this thread here: PhoneGap ChildBrowser Executing JavaScript
He has modified childbrowser to accomplish this very task
Upvotes: 1