[ https://issues.apache.org/jira/browse/CB-12266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15983805#comment-15983805 ]
ASF GitHub Bot commented on CB-12266: ------------------------------------- GitHub user filmaj opened a pull request: https://github.com/apache/cordova-plugin-inappbrowser/pull/218 CB-12266: (browser platform) loadstop event.url is now a string … instead of an object, aligning it with the other platforms. ### Platforms affected Browser. ### What does this PR do? Fixes [CB-12266](https://issues.apache.org/jira/browse/CB-12266): previously in the browser platform, `loadstop` event object's `url` property would be an object and not a string, like the other platforms. ### What testing has been done on this change? Tested in Chrome on a Mac desktop. ### Checklist - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database: [CB-12266](https://issues.apache.org/jira/browse/CB-12266) - [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected. - [ ] Added automated test coverage as appropriate for this change. You can merge this pull request into a Git repository by running: $ git pull https://github.com/filmaj/cordova-plugin-inappbrowser CB-12266 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-inappbrowser/pull/218.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #218 ---- commit bfb33988be6dae6708a254872da3bf4081eeeb7b Author: filmaj <maj....@gmail.com> Date: 2017-04-25T23:19:48Z CB-12266: (browser platform) loadstop event.url is now a string instead of an object, aligning it with the other platforms. ---- > InappBrowser: Browser: loadstop event.url is not a string > --------------------------------------------------------- > > Key: CB-12266 > URL: https://issues.apache.org/jira/browse/CB-12266 > Project: Apache Cordova > Issue Type: Bug > Components: Browser, Plugin InAppBrowser > Affects Versions: 3.5.0 > Environment: All browsers (Chrome, Firefox and IE tested) > Reporter: Pieter-Jan Dewitte > Assignee: Filip Maj > Priority: Minor > Labels: pluginsrelease > > 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: > {quote} > $ cordova create eventstop_url > $ cd eventstop_url > $ cordova plugin add cordova-plugin-inappbrowser > {quote} > Run the following code after device ready: > {code:javascript} > // 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); > }); > {code} > {quote} > $ cordova serve > {quote} > The console output is: > {quote} > loadstop event: Object \{type: "loadstop", url: Location\} > {quote} -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org