Yes, this is known to be difficult due to domain policy, and inAppBrowser is a new instance that does not allow the previous web view to access it.
There is a method, but using the InAppBrowser executeScript() method, which allows you to execute JavaScript in the window that opens.
var win = window.open( "http://icenium.com", "_blank", "EnableViewPortScale=yes" ); win.addEventListener( "loadstop", function() { win.executeScript({ code: "alert( 'hello' );" }); });
You can even provide a callback to retrieve values โโfrom an open Window.
var win = window.open( "http://icenium.com", "_blank", "EnableViewPortScale=yes" ); win.addEventListener( "loadstop", function() { win.executeScript( { code: "document.body.innerHTML" }, function( values ) { alert( values[ 0 ] ); } ); });
Then you can use the return value to store it in local storage
This site contains great code to help you.
source share