cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piotr Zalewa <pzal...@mozilla.com>
Subject Re: onNativeReady and FirefoxOS
Date Mon, 01 Jul 2013 17:05:53 GMT
OK,

now It's stuck on events which are waiting for initialization (in array channel.deviceReadyChannelsArray)
https://github.com/apache/cordova-firefoxos/blob/master/lib/cordova.firefoxos.js#L5976 - onCordovaReady
and onCordovaConnectionReady.
onCordovaReady is fired, but onCordovaConnectionReady is not.

The connection ready event is fired in https://github.com/apache/cordova-firefoxos/blob/master/lib/cordova.firefoxos.js#L5379-L5410
but this code isn't run and hence it's not called when cordova ready is fired.

Any solution for this?

Piotr

----- Original Message -----
From: "Gord Tanner" <gtanner@gmail.com>
To: dev@cordova.apache.org
Sent: Tuesday, June 25, 2013 5:38:01 PM
Subject: Re: onNativeReady and FirefoxOS

I could have swore there was one at one point ;)

but it is going to look exactly like the webos one [1]

[1] -
https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob_plain;f=lib/scripts/bootstrap-webos.js;hb=HEAD


On Tue, Jun 25, 2013 at 10:52 AM, Andrew Grieve <agrieve@chromium.org>wrote:

> likely you want to add a bootstrap.firefoxos.js file
>
>
> On Tue, Jun 25, 2013 at 3:40 AM, Piotr Zalewa <pzalewa@mozilla.com> wrote:
>
> > Hi,
> >
> > Here is me again.
> >
> > I commented out the "reinstantiating" window.navigator to make it not
> > throw SecurityError under FxOS.
> >
> > I then realized the 'deviceready' isn't fired.
> > It should be fired in
> >
> https://github.com/apache/cordova-firefoxos/blob/master/lib/cordova.firefoxos.js#L5977afterchannel.onDOMContentLoaded,
channel.onNativeReady,
> > channel.onPluginsReady.
> > onDOMContentLoaded and onPluginsReady are fired, but onNativeReady is
> not.
> >
> > The only place in this file which is related to this event is this:
> >
> https://github.com/apache/cordova-firefoxos/blob/master/lib/cordova.firefoxos.js#L5954
> >
> >     // _nativeReady is global variable that the native side can set
> >     // to signify that the native code is ready. It is a global since
> >     // it may be called before any cordova JS is ready.
> >     if (window._nativeReady) {
> >         channel.onNativeReady.fire();
> >     }
> >
> > Is this event not fired because of my change to cordova-firefoxos.js
> > (commenting out
> >
> https://github.com/apache/cordova-firefoxos/blob/master/lib/cordova.firefoxos.js#L5945
> > )?
> >
> > Please help
> > zalun
> >
> > PS.
> > There is also an issue later on with onCordovaConnectionReady (but I
> > forced onNativeReady before, so too many variables to play)
> >
>

Mime
View raw message