From bac61c3f081e3652020ada26a30b190626c00992 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sun, 3 Aug 2014 00:59:07 -0400 Subject: [PATCH] Documented Evented differences from Node.js events --- src/event/Evented.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/event/Evented.js b/src/event/Evented.js index e058291..51ec871 100644 --- a/src/event/Evented.js +++ b/src/event/Evented.js @@ -36,7 +36,16 @@ var Trait = require( 'easejs' ).Trait, * listeners. * * The API is motivated by (and is a replacement for) Node.js' event emitter - * implementation, but is more robust. + * implementation, but is more robust. Note, however, that it differs + * significantly in a number of implementation details: + * + * - All events must be pre-registered, and all listeners must hook a + * registered event; + * - The same listener cannot be attached to the same event multiple + * times (will produce an exception); + * - There is no special `error' event that will, if unhooked, trigger an + * exception when emitted; and + * - It is implemented as a trait. */ module.exports = Trait( 'Evented', {