cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kingIZZZY <...@git.apache.org>
Subject [GitHub] cordova-app-hello-world pull request: more helpful stupid-friendly...
Date Thu, 06 Nov 2014 20:46:24 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message