-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ChildBrowser iOS 6.x with Cordova 2.1.0: ChildBrowser.js broken #106
Comments
Happen to Android as well. |
I tried the Workaround with no luck: I get |
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: |
+1 |
@nickopris please describe your workaround |
@gorekee I am not using window.plugins.childBrowser = new ChildBrowser(); I have this in my html: <script type="text/javascript" src="cordova-2.1.0.js"></script> <script type="text/javascript" src="ChildBrowser.js"></script> <script type="text/javascript" src="js/process.js"></script>and this in process.js document.addEventListener("deviceready",onDeviceReady,false); |
Any updates on this issue? I can open ChildBrowser the first time but any other loads cause the error above. |
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.
The text was updated successfully, but these errors were encountered: