0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

21 Commits

Author SHA1 Message Date
Sam Roberts
f8d81222e8 event: make setMaxListeners() return this
setMaxListeners was the only EventEmitter method that returned
undefined, so could not be chained.
2013-05-03 01:15:22 +02:00
Ben Noordhuis
43951d7cfb Merge remote-tracking branch 'origin/v0.10' 2013-05-03 01:13:44 +02:00
Sam Roberts
41cbdc5e64 doc: document return values of EventEmitter methods 2013-05-03 01:10:01 +02:00
Ben Noordhuis
af1ed99ce2 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/ChangeLog
	deps/uv/src/version.c
	lib/http.js
	src/node_crypto.cc
	src/node_os.cc
	src/node_version.h
	test/simple/helper-debugger-repl.js
2013-04-29 14:08:51 +02:00
Ben Noordhuis
cf0fa96db8 events: add EventEmitter.defaultMaxListeners
Class property that controls the maximum number of listeners for all
instances of EventEmitter.

Fixes #3014.

Conflicts:
	lib/events.js
2013-04-19 16:21:37 -07:00
Sean Silva
63466e5cae doc: document value of this inside listeners
Fixes #5326.
2013-04-19 11:58:18 +02:00
Ben Noordhuis
da10bb85ff doc: events: add 'removeListener' event section
Amends commit 84221fd by (also) documenting the 'removeListener' event
in a dedicated section, like the 'newListener' event.

Fixes #4977.
2013-03-12 00:07:18 +01:00
Trevor Norris
75305f3bab events: add check for listeners length
Ability to return just the length of listeners for a given type, using
EventEmitter.listenerCount(emitter, event). This will be a lot cheaper
than creating a copy of the listeners array just to check its length.
2013-03-01 17:36:47 -08:00
Ben Noordhuis
84221fd1d6 events: add 'removeListener' event 2012-09-22 03:48:59 +02:00
Joe Andaverde
20e12e4be3 events: make .listeners() return a copy
Make EventEmitter.listeners(event) return a copy of the listeners array instead
of the array itself.

Fixes #3442.
2012-07-27 20:28:51 +02:00
isaacs
e72addcf8e event: Document the mutability of listeners() 2012-06-14 17:26:51 -07:00
isaacs
2d44dcc8be doc: Add stability indicators to documentation 2012-03-03 17:03:52 -08:00
isaacs
17db291b5c 'Events' is a module, not an event named 's' 2012-02-29 16:04:55 -08:00
isaacs
14d4fbb002 doc refactor: events 2012-02-29 16:04:51 -08:00
Thomas Shinnick
4cf0ce5bb4 docs: typos and minor edits in several modules
Mostly quite minor edits.  Those possibly of more interest are:

  emitter.setMaxListeners(n)

    That the limit is per event name for an emitter.

  fs.readlink()

    Not a path, but rather the symbolic link's string value, which
      would be at best a partial path, certainly not a 'resolvedPath'

  global.__filename

    This may be "well-known" but this is a full path to the module
    that referencing code is running in.  It is not the main program's
    path, unless you are in the main program.  Each module knows only
    its own path.

  server.listen(port,...)

    I actually needed this functionality... "gimme just _any_ next port"

  stream.end()
  stream.destroy()

    Yeah, everybody knows what happens to the queued data, but let's
    make it *really* explicit for the first readers.
2011-09-06 18:19:41 +02: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
8f23583d10 A few spelling fixes.
Thanks Bjarki. Closes GH-561.
2011-01-27 14:24:10 -08:00
Ryan Dahl
9da75f39d9 Print error when EventEmitters get too many listeners 2011-01-10 13:48:35 -08:00
Silas Sewell
11b2ee7632 Various doc tweaks (2-spaces vs tabs, EOL-whitespace, repl prompt, "world" vs "World", etc...) 2010-11-21 14:33:09 -08:00
Micheil Smith
a6c3d7121b Reworked and cleaned up documentation for Events 2010-11-14 13:52:34 -08:00
Micheil Smith
e190c9616e Splitting documentation 2010-10-28 14:59:15 -07:00