removed disconnect button for example
This commit is contained in:
parent
6c13be376f
commit
acfce06912
@ -1,7 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<button id="button">Disconnect</button>
|
||||
<h1 id="contenteditable" contentEditable></h1>
|
||||
<textarea style="width:80%;" rows=40 id="textfield"></textarea>
|
||||
|
||||
|
@ -7,7 +7,7 @@ Y({
|
||||
namespace: 'offlineEditingDemo'
|
||||
},
|
||||
connector: {
|
||||
name: 'webrtc',
|
||||
name: 'websockets-client',
|
||||
room: 'offlineEditingDemo',
|
||||
debug: true
|
||||
},
|
||||
@ -38,15 +38,4 @@ Y({
|
||||
if (textpromise == null) {
|
||||
yconfig.root.set('text', Y.Text)
|
||||
}
|
||||
// We also provide a button for disconnecting/reconnecting the shared element
|
||||
var button = document.querySelector('#button')
|
||||
button.onclick = function () {
|
||||
if (button.innerText === 'Disconnect') {
|
||||
yconfig.disconnect()
|
||||
button.innerText = 'Reconnect'
|
||||
} else {
|
||||
yconfig.reconnect()
|
||||
button.innerText = 'Disconnect'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user