Files
yjs/examples/xml/index.js

14 lines
298 B
JavaScript
Raw Normal View History

2017-05-19 02:21:50 +02:00
/* global Y */
2018-01-25 17:28:33 -07:00
let y = new Y('xml-example', {
2017-05-19 02:21:50 +02:00
connector: {
name: 'websockets-client',
2018-01-25 17:28:33 -07:00
url: 'http://127.0.0.1:1234'
2017-05-19 02:21:50 +02:00
}
})
2018-01-25 17:28:33 -07:00
window.yXml = y
// bind xml type to a dom, and put it in body
window.sharedDom = y.define('xml', Y.XmlElement).getDom()
document.body.appendChild(window.sharedDom)