summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-14 13:48:08 +0100
committerwm4 <wm4@nowhere>2014-02-14 14:01:27 +0100
commit414c4f93225652fe62541cf6fe37873776670544 (patch)
tree6319481a26d76aeb7d1ea4cd3de708637d408283 /DOCS
parent99e38aee9aa52c9a06772d2a6bd5e5bdf17ebc79 (diff)
downloadmpv-414c4f93225652fe62541cf6fe37873776670544.tar.bz2
mpv-414c4f93225652fe62541cf6fe37873776670544.tar.xz
lua: make register_event() not overwrite previous event handler
Instead, chain them. Note that there's no logic to prevent the other event handlers to be run from an event handler (like it's popular in GUI toolkits), because I think that's not very useful for this purpose.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/man/en/lua.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/DOCS/man/en/lua.rst b/DOCS/man/en/lua.rst
index 02e7ca8ea9..54b05d9ea5 100644
--- a/DOCS/man/en/lua.rst
+++ b/DOCS/man/en/lua.rst
@@ -100,6 +100,10 @@ The ``mp`` module is preloaded, although it can be loaded manually with
associated, the ``error`` field is set to a string describing the error,
on success it's not set.
+ If multiple functions are registered for the same event, they are run in
+ registration order, which the first registered function running before all
+ the other ones.
+
Returns true if such an event exists, false otherwise.
See `Events`_ and `List of events`_ for details.