function inputCounter(container) {
    var counters = getElements('[data-counter]', container);

    for (var i = 0; i < counters.length; i++) {
      var counter = counters[i];
      var ref = counter.dataset['counter'];
      var input = getElement("#".concat(ref));

      if (isHTMLElement(input)) {
        counter.dataset['counterMax'] = input.maxLength;
        counter.dataset['counterVal'] = input.value.length;
        bindEvents(input, counter);
      } else {
        console.error("%c@zenkai%c #InputCounter>%cinputCounter:%c Failed to add counter ".concat(ref, ". Input (referenced) was not found."), "text-decoration: underline", "", "font-weight: bold;", "font-weight: normal;");
      }
    }
    /**
     * Bind DOM events
     * @param {HTMLInputElement} input 
     * @param {HTMLElement} counter 
     */


    function bindEvents(input, counter) {
      input.addEventListener('input', function (e) {
        counter.dataset['counterVal'] = input.value.length;
      });
    }

    return counters;
  }
/**
   * Add a counter to an input element
   * @param {HTMLElement} container 
   */
Add a counter to an input element
@param {HTMLElement} container
Add a counter to an input element @param { HTMLElement } container
function inputCounter(container) {
    var counters = getElements('[data-counter]', container);
    for (var i = 0; i < counters.length; i++) {
      var counter = counters[i];
      var ref = counter.dataset['counter'];
      var input = getElement("#".concat(ref));
      if (isHTMLElement(input)) {
        counter.dataset['counterMax'] = input.maxLength;
        counter.dataset['counterVal'] = input.value.length;
        bindEvents(input, counter);
      } else {
        console.error("%c@zenkai%c #InputCounter>%cinputCounter:%c Failed to add counter ".concat(ref, ". Input (referenced) was not found."), "text-decoration: underline", "", "font-weight: bold;", "font-weight: normal;");
      }
    }
    function bindEvents(input, counter) {
      input.addEventListener('input', function (e) {
        counter.dataset['counterVal'] = input.value.length;
      });
    }
    return counters;
  }
function inputCounter ( container ) { var counters = getElements ( '[data-counter]' , container ) ; for ( var i = 0 ; i < counters . length ; i ++ ) { var counter = counters [ i ] ; var ref = counter . dataset [ 'counter' ] ; var input = getElement ( "#" . concat ( ref ) ) ; if ( isHTMLElement ( input ) ) { counter . dataset [ 'counterMax' ] = input . maxLength ; counter . dataset [ 'counterVal' ] = input . value . length ; bindEvents ( input , counter ) ; } else { console . error ( "%c@zenkai%c #InputCounter>%cinputCounter:%c Failed to add counter " . concat ( ref , ". Input (referenced) was not found." ) , "text-decoration: underline" , "" , "font-weight: bold;" , "font-weight: normal;" ) ; } } function bindEvents ( input , counter ) { input . addEventListener ( 'input' , function ( e ) { counter . dataset [ 'counterVal' ] = input . value . length ; } ) ; } return counters ; }
Add a counter to an input element
 @param {HTMLElement} container
Add a counter to an input element @param { HTMLElement } container
/**
     * Bind DOM events
     * @param {HTMLInputElement} input 
     * @param {HTMLElement} counter 
     */