Closed ChristianWeyer closed 11 years ago
One immediate fix is to replace gap. with cordova.
It works for me on 2.1.
addConstructor
is still there, and has no deprecation warning:
https://github.com/apache/incubator-cordova-js/blob/master/lib/cordova.js#L229
window.plugins
is defined in the constructor:
https://github.com/alunny/ChildBrowser/blob/master/www/childbrowser.js#L106-110
and gap
is a backwards-compatible alias for cordova
https://github.com/alunny/ChildBrowser/blob/master/www/childbrowser.js#L115
Are you waiting for deviceready
to check for window.plugins
?
Hm. Yes I am waiting for deviceready. Strange. When I explicitly use cordova. instead of .gap it works.
Sent from a mobile device. Please excuse brevity and typos.
Am 23.10.2012 um 20:13 schrieb "Andrew Lunny" notifications@github.com<mailto:notifications@github.com>:
It works for me on 2.1.
addConstructor is still there, and has no deprecation warning: https://github.com/apache/incubator-cordova-js/blob/master/lib/cordova.js
window.plugins is defined in the constructor: https://github.com/alunny/ChildBrowser/blob/master/www/childbrowser.js#L106-110
and gap is a backwards-compatible alias for cordova https://github.com/alunny/ChildBrowser/blob/master/www/childbrowser.js#L115
Are you waiting for deviceready to check for window.plugins?
— Reply to this email directly or view it on GitHubhttps://github.com/alunny/ChildBrowser/issues/22#issuecomment-9711954.
Like cordova.exec instead of gap.exec
Sent from a mobile device. Please excuse brevity and typos.
Am 23.10.2012 um 21:53 schrieb "Christian Weyer" christian.weyer@thinktecture.com<mailto:christian.weyer@thinktecture.com>:
Hm. Yes I am waiting for deviceready. Strange. When I explicitly use cordova. instead of .gap it works.
Sent from a mobile device. Please excuse brevity and typos.
Am 23.10.2012 um 20:13 schrieb "Andrew Lunny" notifications@github.com<mailto:notifications@github.com>:
It works for me on 2.1.
addConstructor is still there, and has no deprecation warning: https://github.com/apache/incubator-cordova-js/blob/master/lib/cordova.js
window.plugins is defined in the constructor: https://github.com/alunny/ChildBrowser/blob/master/www/childbrowser.js#L106-110
and gap is a backwards-compatible alias for cordova https://github.com/alunny/ChildBrowser/blob/master/www/childbrowser.js#L115
Are you waiting for deviceready to check for window.plugins?
— Reply to this email directly or view it on GitHubhttps://github.com/alunny/ChildBrowser/issues/22#issuecomment-9711954.
I have it working on 2.1, however I did have to update Cordova.plist to this:
I can confirm it works with even version 2.2, without having to change anything in the JS file, but mapping the plugin as mentioned above.
Yes, I can confirm - thx all!
Does really anybody have this working in PG 2.1? I get undefined on window.plugins ... and when looking at childbrowser.js it still uses addConstructor which is (AFAIK) deprecated...
Hm.