cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [cordova-plugin-inappbrowser] jacobg edited a comment on issue #372: OverrideUserAgent changes user agent for Cordova view too
Date Thu, 30 Apr 2020 15:49:31 GMT

jacobg edited a comment on issue #372:

   @faisakhtar Yes, I wrote a wrapper function that checks if in-app browser has been opened
at least once. If not, then it opens and closes the window one time, before opening it again.
It happens pretty fast, so it's not so noticeable.
   Here is example code. I modified it a little from my own application to make it more generic,
so there may be a typo.
   ensureIabOpenedAtLeastOnce (args) {
     // cordova-plugin-inappbrowser seems to have a bug on iOS WkWebView with overriding user
agent first time
     // window is opened:
     if (!this.iabOpenedAtLeastOnce && isIos && window.cordova) {
       const win = openIabWindow[('about:blank'])
       win.addEventListener('loadstop', () => {
         win.addEventListener('exit', () => {
     } else {
   openIabWindow (args) {
     this.iabOpenedAtLeastOnce = true

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message