Skip to content

Commit f33eac5

Browse files
updated documentation based on jsdoc
1 parent 4631ae5 commit f33eac5

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

src/strophe.ping.js

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ Strophe.addConnectionPlugin('ping', {
2525
},
2626

2727
/**
28-
* Function: ping
29-
*
30-
* Parameters:
31-
* (String) to - The JID you want to ping
32-
* (Function) success - Callback function on success
33-
* (Function) error - Callback function on error
34-
* (Integer) timeout - Timeout in milliseconds
35-
*/
28+
* Function: ping
29+
*
30+
* @param {string} to - The JID you want to ping
31+
* @param {function} success - Callback function on success
32+
* @param {function} error - Callback function on error
33+
* @param {number} timeout - Timeout in milliseconds
34+
*/
3635
ping: function(jid, success, error, timeout) {
3736
var id = this._c.getUniqueId('ping');
3837
var iq = $iq({type: 'get', to: jid, id: id}).c(
@@ -41,11 +40,10 @@ Strophe.addConnectionPlugin('ping', {
4140
},
4241

4342
/**
44-
* Function: pong
45-
*
46-
* Parameters:
47-
* (Object) ping - The ping stanza from the server.
48-
*/
43+
* Function: pong
44+
*
45+
* @param {Object} ping - The ping stanza from the server
46+
*/
4947
pong: function(ping) {
5048
var from = ping.getAttribute('from');
5149
var id = ping.getAttribute('id');
@@ -54,14 +52,12 @@ Strophe.addConnectionPlugin('ping', {
5452
},
5553

5654
/**
57-
* Function: addPingHandler
58-
*
59-
* Parameters:
60-
* (Function) handler - Ping handler
61-
*
62-
* Returns:
63-
* A reference to the handler that can be used to remove it.
64-
*/
55+
* Function: addPingHandler
56+
*
57+
* @param {Function} handler - Ping handler
58+
*
59+
* @returns A reference to the handler that can be used to remove it.
60+
*/
6561
addPingHandler: function(handler) {
6662
return this._c.addHandler(handler, Strophe.NS.PING, "iq", "get");
6763
}

0 commit comments

Comments
 (0)