2.2.0 • Published 8 years ago

listen-once v2.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
8 years ago

Listen Once

Will add an event listener that will only fire the first time.

Install is like:

npm install --save listen-once

Use it like:

listenOnce(element, eventName, handler, capture);

It can even take a array of event names to listen to and will only fire the handler on the first one. useful if you want to intentionally create a race condition.

listenOnce(element, ['mouse', 'key', 'earthquake'], handler);
2.2.0

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago