I'm working with Cordova loading a HTML in a iframe. All work fine but I need access to the plugins in the original HTML.
The original code is like this
navigator.camera.getPicture(onSuccess, onFail);
When I load that HTML in a iframe I need make this
parent.navigator.camera.getPicture(onSuccess, onFail);
This code work but I really need don't change the original code. Somebody know how I can use cordova plugins in a iframe ?
Add the cordova.js link to the html file being loaded into your ifame.
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With