Skip to content

Commit 854600e

Browse files
committed
Document return values for listener functions
1 parent d7bce57 commit 854600e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pynetworktables2js/js/networktables.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ var NetworkTables = new function () {
112112
that indicates whether the websocket is connected
113113
:param immediateNotify: If true, the function will be immediately called
114114
with the current status of the websocket
115+
:returns: a function that will unsubscribe
115116
*/
116117
this.addWsConnectionListener = function(f, immediateNotify) {
117118
connectionListeners.push(f);
@@ -137,6 +138,7 @@ var NetworkTables = new function () {
137138
that indicates whether the robot is connected
138139
:param immediateNotify: If true, the function will be immediately called
139140
with the current robot connection state
141+
:returns: a function that will unsubscribe
140142
*/
141143
this.addRobotConnectionListener = function(f, immediateNotify) {
142144
robotConnectionListeners.push(f);
@@ -160,6 +162,7 @@ var NetworkTables = new function () {
160162
for entry, value: value of entry, isNew: If true, the entry has just been created
161163
:param immediateNotify: If true, the function will be immediately called
162164
with the current value of all keys
165+
:returns: a function that will unsubscribe
163166
*/
164167
this.addGlobalListener = function(f, immediateNotify) {
165168
globalListeners.push(f);
@@ -186,6 +189,7 @@ var NetworkTables = new function () {
186189
for entry, value: value of entry, isNew: If true, the entry has just been created
187190
:param immediateNotify: If true, the function will be immediately called
188191
with the current value of the specified key
192+
:returns: a function that will unsubscribe
189193
*/
190194
this.addKeyListener = function(key, f, immediateNotify) {
191195
var listeners = keyListeners.get(key);

0 commit comments

Comments
 (0)