millermedeiros / js-signals

Custom Event/Messaging system for JavaScript inspired by AS3-Signals
http://millermedeiros.github.com/js-signals/
1.97k stars 179 forks source link

Documentation doesn't mention listeners can return false #70

Open Sjeiti opened 8 years ago

Sjeiti commented 8 years ago

The documentation doesn't mention listeners returning false will stop execution of subsequent listeners. I had to find out by debugging and digging through the code.

The jsdoc on the add method should be updated to something like

* @param {Function} listener Signal handler function. When a listener returns false, subsequent listeners are not executed.

(I could create a pull request but that's a bit overkill for such a small change, plus I would not be able to run the shell script to update the documentation anyway)

ghost commented 7 years ago

That'd be a good change.

It is documented over in the examples, but it would be best if it was in both places.

Stop/Halt Propagation (method 2)