Nasser Alminji created CB-11878:
-----------------------------------

             Summary: 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


 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to