[
https://issues.apache.org/jira/browse/CB-3509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13685833#comment-13685833
]
Filip Maj commented on CB-3509:
-------------------------------
The issue is the internal cordova event {{onCordovaConnectionReady}} is
declared as "wait for this event to fire before firing deviceready":
{code}
channel.waitForInitialization('onCordovaConnectionReady');
{code}
This event is only fired inside the network plugin's JavaScript.
So, if you want to remove the network code from cordova JS, you have to make
sure the {{waitForInitialization}} call is removed as well.
To modularize this properly, the device motion plugin's JavaScript should
register the {{waitForInitialization}} call. So, when you add the network
plugin to your cordova app, deviceready will be delayed until the network
plugin loads and gets information back about the state of connectivity of the
device.
> network information javascript is tied into cordovajs
> -----------------------------------------------------
>
> Key: CB-3509
> URL: https://issues.apache.org/jira/browse/CB-3509
> Project: Apache Cordova
> Issue Type: Bug
> Components: CordovaJS, Plugin Network Information
> Reporter: Steve Gill
> Assignee: Tim Kim
> Fix For: 3.0.0
>
>
> cordovajs 3.0.0 branch
> When we remove the network/connection javascript code from cordova-js, device
> ready doesn't fire. Will need more investigation.
> Remove code required by network information plugin from cordova js.
> Build cordova js by running jake
> Copy over newly created javascript files to android/ios 3.0.0 branches.
> cordova-ios/CordovaLib/cordova.js
> cordova-android/framework/assets/www/cordova.js
> create android + ios projects using create scripts
> run created projects, device ready doesn't fire. No need to even install
> plugins.
> Need to go to cordova-js and see why device ready doesn't fire after removing
> these files.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira