Ryan Dahl
4ef8f06fe6
Finally remove node::EventEmitter
2011-07-19 01:46:38 -07:00
Ryan Dahl
91f1b250ec
mraleph emit hack
2011-07-08 17:08:52 -07:00
Ryan Dahl
85bc8d02fa
Merge branch 'v0.4'
...
Conflicts:
src/node_crypto.cc
2011-05-16 19:29:02 -07:00
koichik
80c2fe9456
Fix event listener leak check timing
...
Fixes #1041 .
2011-05-14 14:43:00 -07:00
Felix Geisendörfer
bc8489580c
Allow to remove all EventEmitter listeners at once
...
This patch adds support for calling EventEmitter#removeAllListeners
with no parameters in order to remove all listeners as once.
See discussion: https://groups.google.com/forum/#!topic/nodejs-dev/Mcyal1ThTHY
Closes GH-889.
2011-04-12 14:47:16 -07:00
Ryan Dahl
bfa9db9dd6
Merge branch 'v0.4'
...
Conflicts:
src/node_version.h
test/simple/test-buffer.js
2011-04-03 23:42:56 -07:00
Arnout Kazemier
53bec1c862
Added support for removing .once listeners
...
Closes GH-806.
2011-03-25 11:51:29 -07:00
Aaron Heckmann
a4dad95be3
EventEmitter#once only takes instanceof function
2011-03-18 11:18:40 -07:00
Ryan Dahl
55048cdf79
Update copyright headers
2011-03-14 17:37:05 -07:00
Ryan Dahl
81d3de7e6d
setMaxListeners should initialize _events
2011-03-07 13:16:00 -08:00
Ryan Dahl
9da75f39d9
Print error when EventEmitters get too many listeners
2011-01-10 13:48:35 -08:00
Daniel C
ca8cc71bd0
EventEmitter.prototype.once should "return this;"
2010-12-30 18:58:43 -08:00
Ryan Dahl
09329cbb04
more lint
2010-12-01 17:43:30 -08:00
Jeremy Martin
144b2a5338
Fix number of args emitted by EventEmitter during "fast case" (lte 3 args)
2010-11-29 17:25:50 -08:00
Peteris Krumins
a6ee3bac85
Add EventEmitter.prototype.once
2010-10-16 20:43:09 -07:00
Micheil Smith
c1aa8ea944
Removed deprecated events.Promise
2010-10-11 16:16:18 -07:00
Joshaven Potter
3d4e4d8909
syntax fixes to pass jslint
2010-10-06 20:40:57 -07:00
isaacs
e9b6b0b327
Report "weird" errors a little better.
...
There are a few kinds of errors that are very confusing.
1. Errors raised in nextTick
2. Errors emitted on the "error" event
3. RangeErrors that crash the program (or anything without a stack trace)
Long traces will make make these better, of course. In the meantime, this
adds a few handy signposts (in the form of better error reporting and
comments on the otherwise inscrutable code printed to the terminal) that can
help new users find the cause, or at least, ask for help more effectively.
2010-10-02 06:44:28 -07:00
Herbert Vojčík
3e0a8f3ad8
Common subexpression in emit.
2010-09-16 13:47:43 -07:00
Ryan Dahl
6bdc42cee7
shorten some lines in events.js
2010-09-15 15:47:28 -07:00
Ryan Dahl
ae8f8e7258
Optimize emit for two arguments
2010-09-15 15:20:04 -07:00
Ryan Dahl
6961bc568f
More instanceof Array fixes
2010-07-15 14:37:56 -07:00
rick
c9e505791a
use delete for removing events after removing the final listener
2010-07-12 16:29:58 -07:00
Ryan Dahl
515dc2161b
Experimental: 'on' as alias to 'addListener'
2010-07-03 09:30:32 +02:00
Jonas Pfenniger
53a9869ff7
FIX: EventEmitter#removeAllListeners signature
...
This function should return this is all cases.
2010-05-14 19:15:07 -07:00
Jonas Pfenniger
fea6f829bf
FIX: EventEmitter#removeListener logic
...
In the case of one defined listener, the function should only remove it
if it is the same as the passed listener.
2010-05-14 19:13:50 -07:00
Ryan Dahl
cee9080381
Fix typos
2010-04-25 22:44:31 -07:00
Ryan Dahl
0633e5cac9
Optimize for few args in EventEmitter.emit
2010-04-22 17:31:35 -07:00
Ryan Dahl
6abdf051d3
Unhandled 'error' events kill program
...
By default 'error' throws. addListener to prevent this.
2010-04-22 17:22:06 -07:00
isaacs
7ff53f4c6a
Refactor events module to lib/events.js
2010-04-21 11:38:46 -07:00
Ryan Dahl
6befc72f82
Add missing lib/events.js
2010-03-15 14:25:06 -07:00