boynet commented on issue #358: URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/358#issuecomment-2346246686
for anyone here there is better way to solve it now: enable the beforeload event * inAppBrowserRef = cordova.InAppBrowser.open(url, '_blank', 'beforeload=yes'); register to the event * inAppBrowserRef.addEventListener('beforeload', beforeloadCallBack); now for example here is a code that open any link that not start with https http or // with the device browser ``` beforeloadCallBack(params,callback){ let url = params.url; //if it start with // http or https if (url.match(/^(https?:)?\/\//)) { callback(params.url); } else { //let it naturally open by the system so do nothing } } ``` I am not really sure if we still need to add them to AllowedSchemes its undocumented -- 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. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org