Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11520

executeScript does not return value on iOS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • iOS, cordova-plugin-wkwebview-engine

    Description

      The following code does not return any value from the `executeScript`

              var ref = cordova.InAppBrowser.open('http://some-auth-page', '_blank', 'toolbar=no');
              ref.addEventListener('loadstop', function() {
                  var interval = setInterval(function() {
                      ref.executeScript({
                              code: "$ads.secret.parseToken();" 
                          },
                          function(data) {
                              if (data) {
                                  var secretElement = document.getElementById('secret');
                                  secretElement.innerText = JSON.stringify(arguments);
                                  ref.close();
                                  clearInterval(interval);
                              }
                          }
                      );
                  }, 500);
              });
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            jdsalingerjr Joseph Carroll
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: