You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Andrew Grieve <ag...@google.com> on 2012/09/18 17:51:20 UTC
Firing onNativeReady() on iOS
The line looks like:
[NSString stringWithFormat:@"cordova.iOSVCAddr='%lld';try{cordova.require('cordova/channel').onNativeReady.fire();}catch(e){window._nativeReady
= true;}", (long long)self];
My guess is that the try/catch is in case this is run before cordova.js has
had a chance to parse. I'd like to add a comment to that effect if that's
the case, but wanted to make sure first.
Re: Firing onNativeReady() on iOS
Posted by Shazron <sh...@gmail.com>.
> My guess is that the try/catch is in case this is run before cordova.js has
> had a chance to parse.
Correct.
Re: Firing onNativeReady() on iOS
Posted by Michal Mocny <mm...@chromium.org>.
On Tue, Sep 18, 2012 at 12:30 PM, Jesse MacFadyen
<pu...@gmail.com>wrote:
> Correct!
> Or a non cordova including page is loaded in the cordovawebview.
>
> Cheers,
> Jesse
>
> Sent from my iPhone5
>
Did you add this line manually? I thought these weren't available yet..
>
> On 2012-09-18, at 8:52 AM, Andrew Grieve <ag...@google.com> wrote:
>
> > The line looks like:
> >
> > [NSString stringWithFormat:@
> "cordova.iOSVCAddr='%lld';try{cordova.require('cordova/channel').onNativeReady.fire();}catch(e){window._nativeReady
> > = true;}", (long long)self];
> >
> > My guess is that the try/catch is in case this is run before cordova.js
> has
> > had a chance to parse. I'd like to add a comment to that effect if that's
> > the case, but wanted to make sure first.
>
Re: Firing onNativeReady() on iOS
Posted by Jesse MacFadyen <pu...@gmail.com>.
Correct!
Or a non cordova including page is loaded in the cordovawebview.
Cheers,
Jesse
Sent from my iPhone5
On 2012-09-18, at 8:52 AM, Andrew Grieve <ag...@google.com> wrote:
> The line looks like:
>
> [NSString stringWithFormat:@"cordova.iOSVCAddr='%lld';try{cordova.require('cordova/channel').onNativeReady.fire();}catch(e){window._nativeReady
> = true;}", (long long)self];
>
> My guess is that the try/catch is in case this is run before cordova.js has
> had a chance to parse. I'd like to add a comment to that effect if that's
> the case, but wanted to make sure first.