-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.5.0
-
Fix Version/s: None
-
Component/s: cordova-browser, cordova-plugin-inappbrowser
-
Labels:
-
Environment:
All browsers (Chrome, Firefox and IE tested)
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}