You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/01/28 17:10:40 UTC

[jira] [Commented] (CB-10451) InAppBrowser: loadstart event is not triggered on Windows

    [ https://issues.apache.org/jira/browse/CB-10451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15121795#comment-15121795 ] 

ASF GitHub Bot commented on CB-10451:
-------------------------------------

GitHub user sgrebnov opened a pull request:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/145

    InAppBrowser bugfixing on Windows: CB-10451, CB-10452, CB-10454

    CB-10451 InAppBrowser: loadstart event is not triggered on Windows
    CB-10452 InAppBrowser: 'exit' event is not triggered on Windows
    CB-10454 InAppBrowser: 'loaderror' event does not have code and message on Windows

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-plugin-inappbrowser windows-improvements

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/145.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 #145
    
----
commit 2bb462b79daabbdaaa0fda1f7eff401e19fec747
Author: sgrebnov <v-...@microsoft.com>
Date:   2016-01-28T16:08:27Z

    CB-10451 InAppBrowser: loadstart event is not triggered on Windows
    CB-10452 InAppBrowser: 'exit' event is not triggered on Windows
    CB-10454 InAppBrowser: 'loaderror' event does not have code and message on Windows

----


> InAppBrowser: loadstart event is not triggered on Windows
> ---------------------------------------------------------
>
>                 Key: CB-10451
>                 URL: https://issues.apache.org/jira/browse/CB-10451
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser
>            Reporter: Sergey Grebnov
>            Assignee: Sergey Grebnov
>              Labels: Windows, triaged
>
> The following unit test fails as 'loadstart' callback is not called on Windows. Main reason is that it is called internally when we do open before we attach event handler. But this is what docs recommend and what other people uses. We should make open method async (Windows proxy or inappbrowser.js) so that handler could be added this way
> {code}
> it("inappbrowser.spec.4 should support loadstart and loadstop events", function (done) {
>             var onLoadStart = jasmine.createSpy('loadstart event callback').and.callFake(function (evt) {
>                 verifyEvent(evt, 'loadstart');
>             });
>             iabInsance = cordova.InAppBrowser.open(url, '_blank');
>             iabInsance.addEventListener('loadstart', onLoadStart);
>             iabInsance.addEventListener('loadstop', function (evt) {
>                 verifyEvent(evt, 'loadstop');
>                 expect(onLoadStart).toHaveBeenCalled();
>                 done();
>             });
>         });
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org