erknrio
12/27/2015 - 6:48 PM

Inicializar un fichero JS. Lo comentarios iniciales se usan con JS Lint y evitan, entre otras cosas, advertencias al usar el incremental ++

Inicializar un fichero JS. Lo comentarios iniciales se usan con JS Lint y evitan, entre otras cosas, advertencias al usar el incremental ++ y plugins como jquery ($) y underscore (_).

/*jslint nomen: true*/
/*global $:false, jQuery:false*/
/*jslint maxerr: 20, regexp: true, indent: 4, nomen: false, browser: true*/
// nomen: true avoid underscore warning
(function () {
    'use strict';
    
    function init() {
      // events here
    }
    
    document.addEventListener("DOMContentLoaded", function (event) {
        init();
    });
    /*
    $( document ).ready(function () {
        init();
    });
    */
}());