Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

How to close Inapp browser pragmatically?

$
0
0

@y12ec3231 wrote:

Hi friends,Please help me.I called the in app browser function.After transaction is done in app browser the inappbrowser window should close automatically .
listernBrowser() method handles this event.But window not closing automatically.Please help…

My Code:

private childWindow;

constructor(
private iab: InAppBrowser,
) {
this.listenBrowser();

}

listenBrowser()
{
window.addEventListener(“message”, (e) => {
try {
this.childWindow.close();
self.close();
} catch (error) {
console.log(error);
}
}, false);
}
}

openPayment(){
this.childWindow = this.iab.create(this.funService.apiUrl,’_blank’);
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>