Polantaris commented on issue #571:
URL: 
https://github.com/apache/cordova-plugin-inappbrowser/issues/571#issuecomment-820502795


   > @Polantaris I moved my comment over to #540 which is where I meant to post 
it.
   
   Ah, my bad, sorry for any confusion.
   
   > When you say you ended up using `loadstart` instead, I don't think there's 
anything we can use there as we needed to intercept loading and decide whether 
to continue in the launched InApp browser or open in a new system browser. Did 
you have a similar requirement?
   
   My requirement was that I wanted to intercept specific requests before the 
In App Browser attempted to load them because they would be opened outside of 
the In App Browser anyway, but when done in the `loadstart` you would lose 
state information on the page that the redirect came from.
   
   For example, if the user was on a single page application, and clicked a 
link deep within that that would just be opened in a separate window 
(specifically it was an app protocol that the IAB couldn't even recognize), I 
wanted to not leave the page the IAB was on because they would lose their state 
on the page and would have to re-navigate to wherever they were when they came 
back.
   
   The `beforeload` event would work to allow this, but it only worked one time 
and afterward every link on the app effectively became worthless, even ones 
that wouldn't trigger the `beforeload` condition. Completely unusable. This 
issue was never resolved and I had to take the state loss.


-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to