Callback of InAppBrowser execute script


In the Cordova documentation here I see that you can pass execute script a callback function that gets called after the passed script has executed.

I see no mention of this made in the Ionic documentation:

Is there anyway to attach a callback that receives the return value of the executed script (as mentioned in the cordova link above)?


Looks like I answered my own question. You can do something along the lines of:

let browser = new InAppBrowser('');

Would be nice if this was mentioned in the documentation instead of making no mention of return type (Promise) for executeScript.


Thank you golear. it helped.

Point to note to Ionic2. please add an example usage in documentation.


let browser = new InAppBrowser(‘’);

I tried but it does’nt work. It opens the browser, but i can’t see any console log


Hi my friend, have you solved your problem?

I have the same problem to solve.


              const browser = this.inappbrowser.create('','_blank',{location:'no',clearcache:'yes',toolbar:'no'});
              browser.on('loadstop').subscribe(function(event) {

It works


Thank you golear, your answer saved my lots of time.:grinning: