[Pkg-javascript-commits] [sockjs-client] 314/434: Disabling just websockets is sometimes useful - for example cursors.

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit 25312e514654a6ae48cc2ba5ccb5874f58d1bf1d
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Mon Jan 16 12:43:54 2012 +0000

    Disabling just websockets is sometimes useful - for example cursors.
---
 tests/html/example-cursors.html | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/html/example-cursors.html b/tests/html/example-cursors.html
index aae79fa..47ab4cb 100644
--- a/tests/html/example-cursors.html
+++ b/tests/html/example-cursors.html
@@ -29,6 +29,7 @@
   <select id="transport">
   <option value="">- any - </option>
   <option value="websocket">websocket</option>
+  <option value="not-websocket">- not websocket -</option>
   <option value="xdr-streaming">xdr-streaming</option>
   <option value="xhr-streaming">xhr-streaming</option>
   <option value="iframe-eventsource">iframe-eventsource</option>
@@ -62,6 +63,16 @@
         $('#connect').attr('disabled', true);
         $('#disconnect').attr('disabled', false);
         var protocol = $('#transport').val() || undefined;
+        if (protocol === 'not-websocket') {
+            protocol = ['xdr-streaming',
+                      'xhr-streaming',
+                      'iframe-eventsource',
+                      'iframe-htmlfile',
+                      'xdr-polling',
+                      'xhr-polling',
+                      'iframe-xhr-polling',
+                      'jsonp-polling'];
+        }
         log('[connecting] ' + protocol);
         sjs = new SockJS(client_opts.url + '/broadcast', protocol, client_opts.sockjs_opts);
         sjs.onopen = onopen

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list