Closing InAppBrowser itself in Phonegap Application is not working in Iphone . - Mendix Forum

Closing InAppBrowser itself in Phonegap Application is not working in Iphone .

1


We  have a hybrid mobile app and we are using InAppBrowser to display external pages. We want to close the InAppBrowser itself once on click of a button inside the InAppBrowser page. 
I was able to make it work in android using polling. We put the executeScript() call in a loop and continuously check for a status change in the child window. 

var win=window.open( "myurl", "_blank");
win.addEventListener( "loadstop", function(){
       var loop = window.setInterval(function(){
           win.executeScript({
                   code: "window.shouldClose"
               },
               function(values){
                   if(values[0]){
                     win.close();
                     window.clearInterval(loop);
                   }
               }
           );
       },100);
   });

   
and making variable true at the time of close event ( window.shouldClose=true ).

However the same is not working when I am trying this in Iphone, How to make this work in iphone? please help

asked
1 answers
0

That is more a stackoverflow or phonegap question. This one might help: https://stackoverflow.com/questions/21085041/how-to-close-inappbrowser-itself-in-phonegap-application

Regards,

Ronald

 

answered