I have a cordova app and using InAppBrowser to login to a website. On Successful login, I need to pass the response to the App. I am using executeScript() to achieve and the same is working fine in Android, whereas in iOS, the callback for executeScript() is not getting fired.
My Load stop event listener is as follows
var ref = cordova.InAppBrowser.open("XXXX.html", "_blank", 'location=yes,toolbar=yes');
function iabLoadStop(event) {
alert("EXECUTING SCRIPT")
ref.executeScript({
code: "document.body.innerHTML"
}, function(values) {
alert("SCRIPT EXECUTED")
alert(values)
});
}
I am getting "EXECUTING SCRIPT" alert successfully on load stop event, but the executeScript() which was support to alert "SCRIPT EXECUTED" and the innerHTML is not getting fired.