Skip to content

Cast your net on a root element and catch all event matching selectors on your watch list.

Notifications You must be signed in to change notification settings

Magi-KS/EventFish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EventFish

Cast your net on a root element and catch all event matching selectors on your watch list.

var net = new EventFish(document.body)

net.addWatchList('click', 'div.capture', function(e){
  console.log('this div got clicked')
})

net.addWatchList('click', 'a.capture', function(e){
  // this will fail silently because passive listener by default
  // for performance reason
  e.preventDefault()
  console.log('this a got clicked and preventDefault ignored')
})

// to preventDefault
new EventFish(document.body, {passive: false})

About

Cast your net on a root element and catch all event matching selectors on your watch list.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published