You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jack Eastburn (JIRA)" <ji...@apache.org> on 2016/08/23 00:12:20 UTC

[jira] [Updated] (CB-11739) Inconsistent execution of executeScript in Cordova inAppBrowser on iOS

     [ https://issues.apache.org/jira/browse/CB-11739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jack Eastburn updated CB-11739:
-------------------------------
    Description: 
It seems executeScript is not always being called on devices, but always called on emulators. The script executes maybe every other time. But it's never even that consistent. Listener is added every time correctly. Works consistently on Android. Possibly related to the strange behavior others are seeing with WKWebView?

Here's the code:

{code}
var codePass = fooCode;
var executeScriptFunc = function(event) { 
  ref.executeScript({
    code: codePass
  }, function (value) {});
  ref.removeEventListener('loadstop', executeScriptFunc);
};

var ref = cordova.InAppBrowser.open(fooObject.link, "_blank", "location=yes,enableViewportScale=yes");
ref.addEventListener('loadstop', executeScriptFunc)
{code}

Both the emulator and iPhone are using iOS 9.3.4. I'm at a loss for what's different about the emulator environment compared to the iPhone environment that could cause this.

  was:
It seems executeScript is not always being called on devices, but always called on emulators. The script executes maybe every other time. But it's never even that consistent. Listener is added every time correctly. Works consistently on Android. Possibly related to the strange behavior others are seeing with WKWebView?

Here's the code:

var codePass = fooCode;
var executeScriptFunc = function(event) { 
  ref.executeScript({
    code: codePass
  }, function (value) {});
  ref.removeEventListener('loadstop', executeScriptFunc);
};

var ref = cordova.InAppBrowser.open(fooObject.link, "_blank", "location=yes,enableViewportScale=yes");
ref.addEventListener('loadstop', executeScriptFunc)


Both the emulator and iPhone are using iOS 9.3.4. I'm at a loss for what's different about the emulator environment compared to the iPhone environment that could cause this.


> Inconsistent execution of executeScript in Cordova inAppBrowser on iOS
> ----------------------------------------------------------------------
>
>                 Key: CB-11739
>                 URL: https://issues.apache.org/jira/browse/CB-11739
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser
>    Affects Versions: 1.4.0
>         Environment: iOS 9.3.4
>            Reporter: Jack Eastburn
>              Labels: iOS
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> It seems executeScript is not always being called on devices, but always called on emulators. The script executes maybe every other time. But it's never even that consistent. Listener is added every time correctly. Works consistently on Android. Possibly related to the strange behavior others are seeing with WKWebView?
> Here's the code:
> {code}
> var codePass = fooCode;
> var executeScriptFunc = function(event) { 
>   ref.executeScript({
>     code: codePass
>   }, function (value) {});
>   ref.removeEventListener('loadstop', executeScriptFunc);
> };
> var ref = cordova.InAppBrowser.open(fooObject.link, "_blank", "location=yes,enableViewportScale=yes");
> ref.addEventListener('loadstop', executeScriptFunc)
> {code}
> Both the emulator and iPhone are using iOS 9.3.4. I'm at a loss for what's different about the emulator environment compared to the iPhone environment that could cause this.



--
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