Skip to content

stagas/binder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

binder

high level common api for event/delegate

Install

$ component-install stagas/binder

API

binder.on(el, event, [selector], fn, [capture])

returns el

Bind to event for el and invoke fn(e). When a selector is given then events are delegated.

binder.off(el, event, [selector], fn, [capture])

returns el

Unbind event listener fn for el.

binder.once(el, event, [selector], fn, [capture])

returns el

Same as .on but will call .off immediately after the first event.

Credits

Used bits from component/dom (MIT)

License

MIT

About

High level common api for event/delegate.

Resources

Stars

Watchers

Forks

Packages

No packages published