Minor doc string update in evennia.js
This commit is contained in:
parent
2d030afb36
commit
349affe305
1 changed files with 4 additions and 4 deletions
|
|
@ -10,12 +10,12 @@ old and does not support websockets, it will instead fall back to a
|
||||||
long-polling (AJAX/COMET) type of connection (using
|
long-polling (AJAX/COMET) type of connection (using
|
||||||
evennia/server/portal/webclient_ajax.py)
|
evennia/server/portal/webclient_ajax.py)
|
||||||
|
|
||||||
All messages is a valid JSON array on single form:
|
All messages are valid JSON arrays on this single form:
|
||||||
|
|
||||||
["cmdname", args, kwargs],
|
["cmdname", args, kwargs],
|
||||||
|
|
||||||
where args is an JSON array and kwargs is a JSON object that will be
|
where args is an JSON array and kwargs is a JSON object. These will be both
|
||||||
used as argument to call the cmdname function.
|
used as arguments emitted to a callback named "cmdname" as cmdname(args, kwargs).
|
||||||
|
|
||||||
This library makes the "Evennia" object available. It has the
|
This library makes the "Evennia" object available. It has the
|
||||||
following official functions:
|
following official functions:
|
||||||
|
|
@ -45,7 +45,7 @@ An "emitter" object must have a function
|
||||||
relay the data to its correct gui element.
|
relay the data to its correct gui element.
|
||||||
- The default emitter also has the following methods:
|
- The default emitter also has the following methods:
|
||||||
- on(cmdname, listener) - this ties a listener to the backend. This function
|
- on(cmdname, listener) - this ties a listener to the backend. This function
|
||||||
should be called as listener(kwargs) when the backend calls emit.
|
should be called as listener(args, kwargs) when the backend calls emit.
|
||||||
- off(cmdname) - remove the listener for this cmdname.
|
- off(cmdname) - remove the listener for this cmdname.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue