Ionic Native, InAppBrowser, Javascript, reference InAppBrowser object


I’m at a bit of a loss, hopefully someone here will have come across this.

I am using the Ionic Native InAppBrowser, with

import {InAppBrowser, InAppBrowserRef} from 'ionic-native';

then I am looking to use the standard functions:; browser.close(); browser.addEventListener(type, callback); browser.executeScript(script, callback); browser.insertCSS(css, callback);

The problem I have is that I am using plain Javascript, so I’m looking for a translation of this syntax:

let browser: InAppBrowserRef =, target, options);

into Javascript so I can use the InAppBrowser object across my page functions.

Any help please?



var browser =, target, options);


Thanks for the reply. You mean you put this In the constructor?


Hi, putting it before making any should do if I understand you correctly.

I’d strongly recommend converting your project to typescript, can save you a lot of hassle along the way.