This is a real issue.

The InAppBrowser executeScript used to work fine. After compiling my app again 
the "callback" or "promise" is not executed.

Here is my code that used to work:
```
const ref = cordova.InAppBrowser.open(someURL, '_blank', 'location=yes');

ref.addEevntListener('loadstop', () => {
  ref.executeScript({ code: 'someFunctionWithReturnValue();', (data) => {
    if (data[0] != null) {
      alert(JSON.parse(data[0]);
    }
  }
});
```

Here is a suggestion that it must be used as a promise but it also does not 
work:
`ref.executeScript({code: 'getAuthenticationInfo();'}).then((data) => {
  alert(JSON.parse(data[0]));
  }).catch((e) => {
   alert(e);
  });`

I really don't have an answer to this one. Already spend too much time on this 
issue. As I said, it used to work fine with the callback function but not 
anymore.

[ Full content available at: 
https://github.com/apache/cordova-plugin-inappbrowser/issues/279 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to