File Revert-Remove-the-default-value-of-wsProtocols.patch of Package novnc.25482

Author: Jan Zerebecki <jzerebecki@suse.com>
Date:   Thu Aug 4 14:44:14 2022 +0200

    Revert "Remove the default value of wsProtocols"
    
    This reverts commit c912230309806aacbae4295faf7ad6406da97617.

diff --git a/core/rfb.js b/core/rfb.js
index f35d503..46f5169 100644
--- a/core/rfb.js
+++ b/core/rfb.js
@@ -87,7 +87,7 @@ export default class RFB extends EventTargetMixin {
         this._rfbCredentials = options.credentials || {};
         this._shared = 'shared' in options ? !!options.shared : true;
         this._repeaterID = options.repeaterID || '';
-        this._wsProtocols = options.wsProtocols || [];
+        this._wsProtocols = options.wsProtocols || ['binary'];
 
         // Internal state
         this._rfbConnectionState = '';
diff --git a/docs/API.md b/docs/API.md
index d78360a..d55a234 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -195,8 +195,7 @@ connection to a specified VNC server.
         encountered.
 
     `wsProtocols`
-      - An `Array` of `DOMString`s specifying the sub-protocols to use
-        in the WebSocket connection. Empty by default.
+      - Protocols to use in the WebSocket connection, the default is: ['binary']
 
 #### connect
 
openSUSE Build Service is sponsored by