title: addEventListener calling function twice with in immediate function pattern
body: <p>I am getting issue with calling immediate function with addEventListener, which is calling it twice. tried to change from bubbling to capturing but not working.
  here is my code</p>
  
  <p>some description: I am trying to add text box where it clicked.</p>
  
  <pre><code>var mod = (function(){
  
      var sEventType = 'click',
          labelObj = document.getElementsByTagName('label');
  
              return {
  
                      createTextBox : function(targetId,inputVal){
  
                          alert('hi');
                          var elemInput = document.createElement('input');
                      },
  
                      addEvents : function(){
  
                          for (var i = 0; i &lt; labelObj.length; i++) {
                              if (window.addEventListener) //Firefox, Chrome, Safari, IE 10
                              labelObj[i].addEventListener(sEventType,function(){ mod.createTextBox(this,this.innerHTML);}, false);
                              else if (window.attachEvent) //IE &lt; 9
                              labelObj[i].attachEvent(sEventType, function(){ mod.createTextBox(this,this.innerHTML);});
                          }
                      }
            }
    }());
  
    //Intialise Event
    mod.addEvents();
  </code></pre>
  
  <p>Check out addEventListener which is calling createTextBox ,alert inside popup twice.</p>
  
  <p>Here is HTML part </p>
  
  <pre><code>&lt;body&gt;
  
  &lt;div id='tableMain'&gt;
  
    &lt;div id='exlTopHd'&gt;
      &lt;div id='loginData'&gt;
        &lt;div id='yourName'&gt;&lt;label id='mNam'&gt;type your name here&lt;/label&gt;&lt;/div&gt;
        &lt;div id='yourEmail'&gt;&lt;label&gt;your email address&lt;/label&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div id='exlCtr'&gt;
          &lt;div id='exlTitle'&gt;&lt;label&gt;add title&lt;lable&gt;&lt;/div&gt;
          &lt;div id='addRow'&gt;+row&lt;/div&gt;
          &lt;div id='addColomn'&gt;+colomn&lt;/div&gt;
          &lt;div id='saveExl'&gt;saving...&lt;/div&gt;
      &lt;/div&gt;  
    &lt;/div&gt;
  
    &lt;div id='exlTb'&gt;&lt;/div&gt;
  
  &lt;/div&gt;  
  </code></pre>
  
  <p></p>