[ 
https://issues.apache.org/jira/browse/CB-11878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15522691#comment-15522691
 ] 

jcesarmobile commented on CB-11878:
-----------------------------------

The strange thing is that it works when using _self, loadstop is only supposed 
to work when using _blank

> The inAppBrowser acts weirldy
> -----------------------------
>
>                 Key: CB-11878
>                 URL: https://issues.apache.org/jira/browse/CB-11878
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser
>            Reporter: Nasser Alminji
>            Priority: Minor
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>  var ref;
>         if (device.platform == 'Android') {
>             ref = window.open('https://hadaf.pro', '_blank' 
> ,'location=no,toolbar=no');
>         } else {
>             ref = window.open('https://hadaf.pro', '_blank' 
> ,'location=no,toolbar=no');
>         }
>         /*
>         var ref;
>         if (device.platform == 'Android') {
>             ref = window.open('http://192.168.1.7:3000', '_self' 
> ,'location=no,toolbar=no');
>         } else {
>             ref = window.open('http://192.168.1.7:3000', '_blank' 
> ,'location=no,toolbar=no');
>         }
>         */
>         ref.addEventListener( "loadstop", function() {
>             ref.executeScript({ 
>                 code: "localStorage.setItem('pushnotifId','"+regId+"'); 
> localStorage.setItem('platform','"+device.platform+"');"
>                 //code: "alert('InApp');if (typeof(Storage) !== 'undefined') 
> { alert('There is '); } else { alert('No local storage '); }; 
> localStorage.setItem('pushnotifId','"+regId+"'); 
> localStorage.setItem('platform','"+device.platform+"'); 
> alert('LocalStorage'+localStorage.getItem('platform'));"
>             },function(data) { alert("Code Inserted Succesfully")});
>         })
> In android I get "Code Inserted Succesfully" when using _blank in both 
> https://hadaf.pro and the local http://192..., however I get "Code Inserted 
> Succesfully" when using _self only in the http://192.. but not in the 
> https://hadaf.pro
> So basically local storage seems to act weirdly in _self;



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to