Skip to content

Commit 12f9d14

Browse files
committed
Added readyState attribute values to WebSocket constructor
1 parent c178dd1 commit 12f9d14

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

www/websocket.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/**
2020
* Cordova WebSocket Plugin for Android
2121
* @author KNOWLEDGECODE <knowledgecode@gmail.com>
22-
* @version 0.12.0
22+
* @version 0.12.1
2323
*/
2424
(function (window) {
2525
'use strict';
@@ -264,6 +264,10 @@
264264
WebSocketPrototype.prototype.constructor = WebSocketPrototype;
265265
WebSocket.prototype = new WebSocketPrototype();
266266
WebSocket.prototype.constructor = WebSocket;
267+
WebSocket.CONNECTING = 0;
268+
WebSocket.OPEN = 1;
269+
WebSocket.CLOSING = 2;
270+
WebSocket.CLOSED = 3;
267271
WebSocket.pluginOptions = {};
268272
module.exports = WebSocket;
269273
window.addEventListener('message', taskQueue.listener, true);

0 commit comments

Comments
 (0)