浏览代码

Fix docs example on how to use the shared worker

JC Brand 2 年之前
父节点
当前提交
3004d7bff5
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      dev.html
  2. 1 1
      docs/source/configuration.rst

+ 1 - 0
dev.html

@@ -42,6 +42,7 @@
         websocket_url: 'wss://conversejs.org/xmpp-websocket',
         websocket_url: 'wss://conversejs.org/xmpp-websocket',
         // websocket_url: 'ws://chat.example.org:5380/xmpp-websocket',
         // websocket_url: 'ws://chat.example.org:5380/xmpp-websocket',
         whitelisted_plugins: ['converse-debug'],
         whitelisted_plugins: ['converse-debug'],
+        connection_options: { worker: '/dist/shared-connection-worker.js' }
     });
     });
 </script>
 </script>
 </body>
 </body>

+ 1 - 1
docs/source/configuration.rst

@@ -693,7 +693,7 @@ appear in another.
 .. code-block:: javascript
 .. code-block:: javascript
 
 
         converse.initialize({
         converse.initialize({
-            connection_options: { 'worker': true }
+            connection_options: { worker: '/dist/shared-connection-worker.js' }
         });
         });