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

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

GitHub user sgrebnov opened a pull request:

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

    CB-9445 Improves executeScript callbacks on iOS

    https://issues.apache.org/jira/browse/CB-9445
    
    The following code could be used for tests
    ```
    var ref = window.open('http://apache.org', '_blank', 'location=yes');
            ref.addEventListener('loadstart', function() {
                ref.executeScript({code: "window.some_var = 'some 
value';"},function(){
                     ref.executeScript({code: "window.some_var2 = 'some 
value2';"},function(){
                        alert('loadstart2 callback');
                      });
    
                    alert('loadstart1 callback');
    
                });
    
            });
    
            ref.addEventListener('loadstop', function() {
                ref.executeScript({code: "alert('loadstop code:' + 
window.some_var + ' '+ window.some_var2);"},function(){alert('loadstop 
callback');});
            });
    ```


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

    $ git pull https://github.com/MSOpenTech/cordova-plugin-inappbrowser CB-9445

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

    https://github.com/apache/cordova-plugin-inappbrowser/pull/125.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 #125
    
----
commit 8456a7692663e4e87d0775b5aa428b86f971f3d0
Author: sgrebnov <[email protected]>
Date:   2015-11-20T16:15:55Z

    CB-9445 Improves executeScript callbacks on iOS

----


> executeScript callbacks not working for iOS
> -------------------------------------------
>
>                 Key: CB-9445
>                 URL: https://issues.apache.org/jira/browse/CB-9445
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser
>    Affects Versions: 5.1.1
>         Environment: Cordova 5.1.1 (CLI), ios 3.8.0, android 4.0.2, 
> cordova-plugin-inappbrowser 1.0.1 (NPM)
>            Reporter: Scott Seitz
>            Assignee: jcesarmobile
>              Labels: Triaged, iOS
>
> Can someone please check to see if they are encountering the same problem I 
> am in the environment I've listed? (latest released builds of everything I 
> think)
> I open an inappbrowser window and then run an executeScript command using 
> "code:" (not "file:").  Everything works fine on Android, but on iOS, it 
> simply will NOT fire the callback function after executing the injected code. 
>  Make the "code:" as simple as you like to test it and see if you can get a 
> callback to fire.  I've dumbed it down as much as possible and can't get one 
> to fire.  I know that all instances of code I've injected have run fine in 
> the iab by using the console (against the iab) to check for the variables I 
> was creating in the code.  I can't even get a callback to fire that doesn't 
> expect a parameter to be passed back...
> Many thanks,
> Scott



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to