https://github.com/phenax/event_handler_js
A very simple event handler which allows you to create and emit custom events.
https://github.com/phenax/event_handler_js
Last synced: 3 months ago
JSON representation
A very simple event handler which allows you to create and emit custom events.
- Host: GitHub
- URL: https://github.com/phenax/event_handler_js
- Owner: phenax
- Created: 2015-09-19T16:36:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-13T14:50:52.000Z (over 9 years ago)
- Last Synced: 2025-01-16T19:52:34.877Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A SIMPLE EVENT HANDLER FOR JS
### To create an event, use...
```javascript
events.bind('nameOfEvent',eventCallback);
```### To emit an event, use...
```javascript
events.emit('nameOfEvent');
```### To remove an event, use...
```javascript
events.unbind('nameOfEvent',eventCallback);
```