index.js
/**
   * Emits a custom event on the DOM element stored in the private "el" property of this VanillaHandlebars instance.
   * @function
   * @private
   */
Emits a custom event on the DOM element stored in the private "el" property of this VanillaHandlebars instance.
@function
@private
Emits a custom event on the DOM element stored in the private " el " property of this VanillaHandlebars instance . @function @private
function emit(name){
    var evtData = {
      name: name,
      view: views[name]
    };
    if(!window.jQuery){
      var evt = document.createEvent("CustomEvent");
      evt.initCustomEvent(e.viewLoaded, true, true, evtData);
      el.dispatchEvent(evt);
    } else {
      $(el).trigger(e.viewLoaded, evtData);
    }
  }
function emit ( name ) { var evtData = { name : name , view : views [ name ] } ; if ( ! window . jQuery ) { var evt = document . createEvent ( "CustomEvent" ) ; evt . initCustomEvent ( e . viewLoaded , true , true , evtData ) ; el . dispatchEvent ( evt ) ; } else { $ ( el ) . trigger ( e . viewLoaded , evtData ) ; } }
Emits a custom event on the DOM element stored in the private "el" property of this VanillaHandlebars instance.
Emits a custom event on the DOM element stored in the private " el " property of this VanillaHandlebars instance .
// Native (will not work < IE9) // Use jquery if we have it. Should allow support of old IE.