Skip to content

Latest commit

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

JSListener

A very small javascript library used to be able to broadcast and listen for custom javascript events. It allows for many listeners on the same event to listen and be called.

Using this is very powerful yet easy.. for example:

//specify functions to callfunctioncallMe(msg){console.log("call me hit: "+msg);called_one=true;}functioncallMeAlso(msg){console.log("call me also hit: "+msg);called_two=true;}//setup listenervarjsListener=newJSListener();jsListener.addListener("someEventMessage",callMe);jsListener.addListener("someEventMessage",callMeAlso);//call the listening functionsjsListener.callListeners("someEventMessage","some message");//later remove the listenerjsListener.removeListener("someEventMessage",callMe);

About

A very small javascript library used to be able to broadcast and listen for custom javascript events.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages