Skip to content


Subversion checkout URL

You can clone with
Download ZIP


ChildBrowser iOS 6.x with Cordova 2.1.0: ChildBrowser.js broken #106

createthis opened this Issue · 8 comments

5 participants


ChildBrowser.js appears broken in the iOS branch. The symptom is that javascript execution halts when ChildBrowser.install() is called. I had to debug with weinre to see the javascript error. The problem manifests on this line:

window.plugins.childBrowser = new ChildBrowser();

Which, when run from the weinre console gives this error:

ReferenceError: Can't find variable: ChildBrowser

I'm not a javascript expert, but it seems to be a scoping issue. I don't personally use all of that fancy prototype jargon, so I can't help fix it, but I did find a workaround:

Workaround: Copy ChildBrowser.js from the iPhone directory. This one works fine.


Happen to Android as well.


I tried the Workaround with no luck: I get
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller .'


nickopris, that's a different issue caused by async javascript. google for it.


I reverted to using the original file and I can call the child browser like this:
cordova.exec("ChildBrowserCommand.showWebPage", "" );


@nickopris please describe your workaround


@gorekee I am not using window.plugins.childBrowser = new ChildBrowser();
I just call it like I mentioned above. Just double checked a few minutes ago to make sure it works.

I have this in my html:

and this in process.js

function onDeviceReady()
cordova.exec("ChildBrowserCommand.showWebPage", "" );


Any updates on this issue? I can open ChildBrowser the first time but any other loads cause the error above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.