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

InappBrowser: Browser: loadstop event.url is not a string

    Details

      Description

      In the browser, the url attribute of the loadstop event (InAppBrowserEvent) is not a string as documented, but a Location object. The url is stored in event.href.

      Steps to reproduce:

      $ cordova create eventstop_url
      $ cd eventstop_url
      $ cordova plugin add cordova-plugin-inappbrowser

      Run the following code after device ready:

      // https://ssl.gstatic.com as an example because it is allowed by the default CSP
      var ref = cordova.InAppBrowser.open('https://ssl.gstatic.com', '_blank');
      ref.addEventListener('loadstop', function (event) {
          console.log("loadstop event:", event);
      });
      

      $ cordova serve

      The console output is:

      loadstop event: Object {type: "loadstop", url: Location}

        Attachments

          Activity

            People

            • Assignee:
              filmaj Filip Maj
              Reporter:
              pj.dewitte Pieter-Jan Dewitte
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: