1

I am developing a phonegap application which uses essentially the webview concept based on inappbrowser and some other plugins.I try to extraxt some data from injecting code in the webview through executeScript function in a loadStop event.. the callback function works fine in android device but in ios there is no values returned from the script executed.. For example this code returns an alert because there is no values to extract

 win.executeScript(
                      {
                          code: "localStorage.getItem( 'DetectInterface' )"
                      },
                      function() {
                        alert("test sans valeur retournée avec succes!");
                      }
                  );

But this code didn't return any things:

win.executeScript(
                  {
                      code: "localStorage.getItem( 'DetectInterface' )"
                  },
                  function( values ) {
                    alert("la valeur de values est:"+values);
                    var name = values[ 0 ];
                  }
              );

0 Answers0