Forked from VinnyFonseca/addeventlistener-multiple-events.js
          
        
    
          Created
          February 18, 2020 08:01 
        
      - 
      
 - 
        
Save he66al/2e58eade7c50091c32a3d374d764163c to your computer and use it in GitHub Desktop.  
    addEventListener multiple events
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ["change", "keyup", "paste", "input", "propertychange", "..."].forEach(function(event) { | |
| document.querySelectorAll('.element').addEventListener(event, function() { | |
| // Your callback here | |
| }, false); | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment