Github user kingIZZZY commented on a diff in the pull request:

    
https://github.com/apache/cordova-app-hello-world/pull/9#discussion_r19973706
  
    --- Diff: www/js/index.js ---
    @@ -16,27 +16,15 @@
      * specific language governing permissions and limitations
      * under the License.
      */
    -var app = {
    -    // Application Constructor
    -    initialize: function() {
    -        this.bindEvents();
    -    },
    -    // Bind Event Listeners
    -    //
    -    // Bind any events that are required on startup. Common events are:
    -    // 'load', 'deviceready', 'offline', and 'online'.
    -    bindEvents: function() {
    -        document.addEventListener('deviceready', this.onDeviceReady, 
false);
    -    },
    -    // deviceready Event Handler
    -    //
    -    // The scope of 'this' is the event. In order to call the 
'receivedEvent'
    -    // function, we must explicitly call 'app.receivedEvent(...);'
    -    onDeviceReady: function() {
    -        app.receivedEvent('deviceready');
    -    },
    -    // Update DOM on a Received Event
    -    receivedEvent: function(id) {
    +
    +// before any cordova functionality can be used, you must hook into this 
event
    --- End diff --
    
    perhaps compare to jQuery $(document).ready()


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to