JavaScript Custom Events that are not DOM related

Events is a great technique to loose code coupling. JS Custom Events was a big step to help the front-end developers write better JS.

Despite this there are many cases where you don’t have your app objects represented in the DOM tree. And do you always have to trigger this event to the DOM when you don’t actually want this to be DOM related.

This was the reason I wrote the JavaScript library eventy.js – You can enable event interface for any object of your application. It works both for modules and for JS classes.
In the class option you can use the events both from an instance or from the class itself.

Go and check it on https://github.com/ninio/eventy.js

CategoriesJS

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.