Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 545F417B17 for ; Thu, 28 Jan 2016 17:30:46 +0000 (UTC) Received: (qmail 30149 invoked by uid 500); 28 Jan 2016 17:30:40 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 30126 invoked by uid 500); 28 Jan 2016 17:30:40 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 29978 invoked by uid 99); 28 Jan 2016 17:30:39 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jan 2016 17:30:39 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D7AE52C1F5B for ; Thu, 28 Jan 2016 17:30:39 +0000 (UTC) Date: Thu, 28 Jan 2016 17:30:39 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-10451) InAppBrowser: loadstart event is not triggered on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-10451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15121935#comment-15121935 ] ASF GitHub Bot commented on CB-10451: ------------------------------------- Github user nikhilkh commented on the pull request: https://github.com/apache/cordova-plugin-inappbrowser/pull/145#issuecomment-176293276 Also, I would recommend using `setImmediate` as it has advantages over `setTimeout(fn, 0)`. https://msdn.microsoft.com/en-us/library/windows/apps/hh453394.aspx > 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