[jira] [Commented] (CB-9445) executeScript callbacks not working for iOS

2015-08-20 Thread Scott Seitz (JIRA)

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

Scott Seitz commented on CB-9445:
-

Thanks for looking into this.  I sadly have no idea how to weigh in on this.  
Do we need to pull anyone else into the conversation to ask their thoughts?  Is 
it somehow working differently on the Android platform since that currently 
works?

 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: iOS, 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

 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Comment Edited] (CB-9445) executeScript callbacks not working for iOS

2015-08-20 Thread Scott Seitz (JIRA)

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

Scott Seitz edited comment on CB-9445 at 8/20/15 10:02 PM:
---

If that's the case, then it should definitely be documented.  However, as to 
verifying across devices, running executeScript upon the loadstart event most 
certainly runs the script in the inappbrowser window and fires the callback for 
both iOS and Android.

The problem I ran into was that a subsequent executeScript upon the loadstop 
event worked on both platforms, but only Android fired the callback.  When I 
removed the executeScript from the loadstart event, the executeScript triggered 
by the loadstop event fired the callback just fine on iOS.  

What I failed to test was something akin to polling to see if all callbacks 
(after the loadstop event) work, or whether only one executeScript will work 
per inappbrowser instance.  If jcesarmobile is correct that the reason the 
iFrame (used prior to the loadstop event occuring) disappears is due to the 
page actually finishing loading, then it would stand to reason that an iFrame 
created AFTER the page has loaded would NOT disappear, and you would not have 
to create a new iFrame for every time you call executeScript.

Is it possible (and less onerous) for executeScript to only create a new iFrame 
if it can't find an existing one?

And again...why the heck does the Android platform seem to work just fine?



was (Author: dtc7240):
If that's the case, then it should definitely be documented.  However, as to 
verifying across devices, running executeScript upon the loadstart event most 
certainly runs the script in the inappbrowser window and fires the callback for 
both iOS and Android.

The problem I ran into was that a subsequent executeScript upon the loadstop 
event worked on both platforms, but only Android fired the callback.  When I 
removed the executeScript from the loadstart event, the executeScript triggered 
by the loadstop event fired the callback just fine on iOS.  

What I failed to test was something akin to polling to see if all callbacks 
(after the loadstop event) work, or whether only one executeScript will work 
per inappbrowser instance.  If jcesarmobile is correct that the reason the 
iFrame (used prior to the loadstop event occuring) disappears is due to the 
page actually finishing loading, then it would stand to reason that an iFrame 
created AFTER the page has loaded would NOT disappear, and you would not have 
to create a new one for every time you call executeScript.

Is it possible (and less onerous) for executeScript to only create a new iFrame 
if it can't find an existing one?

And again...why the heck does the Android platform seem to work just fine?


 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: iOS, 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

 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-9445) executeScript callbacks not working for iOS

2015-08-20 Thread Scott Seitz (JIRA)

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

Scott Seitz commented on CB-9445:
-

If that's the case, then it should definitely be documented.  However, as to 
verifying across devices, running executeScript upon the loadstart event most 
certainly runs the script in the inappbrowser window and fires the callback for 
both iOS and Android.

The problem I ran into was that a subsequent executeScript upon the loadstop 
event worked on both platforms, but only Android fired the callback.  When I 
removed the executeScript from the loadstart event, the executeScript triggered 
by the loadstop event fired the callback just fine on iOS.  

What I failed to test was something akin to polling to see if all callbacks 
(after the loadstop event) work, or whether only one executeScript will work 
per inappbrowser instance.  If jcesarmobile is correct that the reason the 
iFrame (used prior to the loadstop event occuring) disappears is due to the 
page actually finishing loading, then it would stand to reason that an iFrame 
created AFTER the page has loaded would NOT disappear, and you would not have 
to create a new one for every time you call executeScript.

Is it possible (and less onerous) for executeScript to only create a new iFrame 
if it can't find an existing one?

And again...why the heck does the Android platform seem to work just fine?


 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: iOS, 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

 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-9445) executeScript callbacks not working for iOS

2015-08-11 Thread Scott Seitz (JIRA)

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

Scott Seitz commented on CB-9445:
-

It took me a little while to isolate this, but I found the test that causes the 
problem.  Essentially, if you add a loadstart event with a callback as well, 
only the first callback ever executes.
{code}
var ref = window.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstart', function() {
ref.executeScript({code: some_var = 'some 
value';},function(){alert('loadstart callback');});
});
ref.addEventListener('loadstop', function() {
ref.executeScript({code: alert('loadstop 
code:');},function(){alert('loadstop callback');});
});
{code}
In fact, if you set this code to trigger from a click event so that you can run 
it more than once, you'll see the following behavior on iOS:
First run -- 'loadstart callback' alert and the 'loadstop code:' alert and 
nothing else
Subsequent runs -- 'loadstop code:' alert and nothing else

On Android, it works just like you would expect.  I didn't catch this before, 
because in my original code, I had a loadstart event that didn't need to do 
anything on the callback, so I didn't realize it wasn't triggering.  Do we have 
a bug?

 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: iOS, 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

 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-9445) executeScript callbacks not working for iOS

2015-08-07 Thread Scott Seitz (JIRA)

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

Scott Seitz commented on CB-9445:
-

Thanks so much for testing for me.  I won't be able to get back to it until 
Monday, but will then.  I appreciate it very much!
Scott

 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: iOS, 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

 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Created] (CB-9445) executeScript callbacks not working for iOS

2015-08-03 Thread Scott Seitz (JIRA)
Scott Seitz created CB-9445:
---

 Summary: 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: iOS, 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


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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org