davidrodma commented on issue #830:
URL:
https://github.com/apache/cordova-plugin-inappbrowser/issues/830#issuecomment-951076119
>
>
> I have a solution to this in our Angular 10 Capacitor App. This should
work in vanilla cordova apps too. Just using `InAppBrowser.open(...)` did not
work for us at all, which is no surprise. InAppBrowser cannot handle action
links properly, so why open it with InAppBrowser?
>
> But hooking into beforeload and opening the links with window.open did
work for us.
>
> ```ts
> const browser = this.iab.create(url, '_blank', this.options);
>
> browser.on('beforeload').subscribe((event) => {
>
> // Check if event url is an action link
> if (event.url.startsWith('tel:') || event.url.startsWith('mailto:'))
{
> console.log('Found an action link! ' + event.url);
> window.open(event.url, '_system');
> return;
> }
> // more workarounds
> ...
> // Nothing from above applies. Continue loading
> console.log('Beforeload released. Continue loading ' + event.url);
> browser._loadAfterBeforeload(event.url);
> });
> ```
>
> I hope this helps anyone!
Save **JensUweB**!!!
Thank You!
Just a note, beforeload parameter in options has it set to 'yes'
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]