implemented xml type for new event system
This commit is contained in:
@@ -1,21 +1,17 @@
|
||||
/* global Y */
|
||||
|
||||
// initialize a shared object. This function call returns a promise!
|
||||
Y({
|
||||
db: {
|
||||
name: 'memory'
|
||||
},
|
||||
let y = new Y({
|
||||
connector: {
|
||||
name: 'websockets-client',
|
||||
url: 'http://127.0.0.1:1234',
|
||||
room: 'html-editor-example6'
|
||||
// maxBufferLength: 100
|
||||
},
|
||||
share: {
|
||||
xml: 'XmlFragment()' // y.share.xml is of type Y.Xml with tagname "p"
|
||||
}
|
||||
}).then(function (y) {
|
||||
window.yXml = y
|
||||
// Bind children of XmlFragment to the document.body
|
||||
window.yXml.share.xml.bindToDom(document.body)
|
||||
})
|
||||
window.yXml = y
|
||||
window.onload = function () {
|
||||
console.log('start!')
|
||||
// Bind children of XmlFragment to the document.body
|
||||
y.get('xml', Y.XmlFragment).bindToDom(document.body)
|
||||
}
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
|
||||
import Y from '../src/y.js'
|
||||
import yArray from '../../y-array/src/y-array.js'
|
||||
import yIndexedDB from '../../y-indexeddb/src/y-indexeddb.js'
|
||||
import yMap from '../../y-map/src/y-map.js'
|
||||
import yText from '../../y-text/src/y-text.js'
|
||||
import yXml from '../../y-xml/src/y-xml.js'
|
||||
import Y from '../src/Y.js'
|
||||
import yWebsocketsClient from '../../y-websockets-client/src/y-websockets-client.js'
|
||||
|
||||
Y.extend(yArray, yIndexedDB, yMap, yText, yXml, yWebsocketsClient)
|
||||
Y.extend(yWebsocketsClient)
|
||||
|
||||
export default Y
|
||||
|
||||
Reference in New Issue
Block a user