-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
y.val('something').getDom() !== yxml.getDom() causing fail in syncing #3
Comments
Here's the whole code. <!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Yjs test</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="bower_components/webcomponentsjs/webcomponents.js"></script>
<script src="bower_components/yjs/y.js"></script>
<script src="bower_components/yjs/y-object.js"></script>
<script src="bower_components/y-list/y-list.js"></script>
<script src="bower_components/y-xml/y-xml.js"></script>
<script src="bower_components/y-webrtc/y-webrtc.js"></script>
<script src="config.js"></script>
</head>
<body>
<p id="container">This is default.</p>
</body>
<script>
var connector = new Y.WebRTC("test", {url: config.server});
var y = new Y(connector);
var p = document.getElementById("container");
var yxml = new Y.Xml(p);
y.val("test", yxml);
</script>
</html> |
This is not a bug. This is what happens: User 1 puts Because this is a common usage of the xml type, I'll find a way to make this easier. I'll also include this in the documentation. |
Ok, thanks for the hint. |
I have the following HTML code
If I create an object this way :
and then go to the console and do in one of two browser :
y.val("test").getDom().textContent = "Changed in local."
, then the value gets updated in one of the two browser.In the other browser, if I type
y.val('test').getDom().textContent
, I get"Changed in local"
butyxml.getDom().textContent
gives me"This is default"
as well asp.textContent
.The text was updated successfully, but these errors were encountered: