You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Joseph Carroll (JIRA)" <ji...@apache.org> on 2016/07/01 15:38:11 UTC
[jira] [Commented] (CB-11520) executeScript does not return value
on iOS
[ https://issues.apache.org/jira/browse/CB-11520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15359142#comment-15359142 ]
Joseph Carroll commented on CB-11520:
-------------------------------------
After a little more investigating, I have found that the {{executeScript}} for the {{InAppBrowser}} does not conform to the API definition listed in the docs:
https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/#inappbrowserexecutescript
This is regardless of whether or not the WKWebViewEngine plugin is being used.
> executeScript does not return value on iOS
> ------------------------------------------
>
> Key: CB-11520
> URL: https://issues.apache.org/jira/browse/CB-11520
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin InAppBrowser, Plugin WKWebViewEngine
> Environment: iOS
> Reporter: Joseph Carroll
>
> The following code does not return any value from the `executeScript`
> {code}
> var ref = cordova.InAppBrowser.open('http://some-auth-page', '_blank', 'toolbar=no');
> ref.addEventListener('loadstop', function() {
> var interval = setInterval(function() {
> ref.executeScript({
> code: "$ads.secret.parseToken();"
> },
> function(data) {
> if (data) {
> var secretElement = document.getElementById('secret');
> secretElement.innerText = JSON.stringify(arguments);
> ref.close();
> clearInterval(interval);
> }
> }
> );
> }, 500);
> });
> {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