diff options
author | cjihrig <cjihrig@gmail.com> | 2018-09-04 00:39:09 +0300 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2018-09-07 03:11:31 +0300 |
commit | 83c1ba3180f4f16e28e4eeba49bed08c8a35befd (patch) | |
tree | 7612878d3343e87caf3e111e67ae530862de60a0 /doc/api/readline.md | |
parent | ed976d76b0cab84eb26618d50541289d3e0687b8 (diff) |
doc: add warning to readline's close() method
When close() is called on a readline instance, it is possible
that data is already buffered, and will trigger 'line' events.
This commit adds a warning to the corresponding docs. Note that
a similar warning already exists for the pause() method.
PR-URL: https://github.com/nodejs/node/pull/22679
Fixes: https://github.com/nodejs/node/issues/22615
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'doc/api/readline.md')
-rw-r--r-- | doc/api/readline.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/api/readline.md b/doc/api/readline.md index 8efc3d6e416..ccc9ee92fe4 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -195,6 +195,9 @@ The `rl.close()` method closes the `readline.Interface` instance and relinquishes control over the `input` and `output` streams. When called, the `'close'` event will be emitted. +Calling `rl.close()` does not immediately stop other events (including `'line'`) +from being emitted by the `readline.Interface` instance. + ### rl.pause() <!-- YAML added: v0.3.4 |