-
Notifications
You must be signed in to change notification settings - Fork 157
Open
Description
I'm trying to use this library with a version of the TreeMirror to have support staff for our application be able to watch a user.
This is currently working pretty well (if we make our form inputs mirror their values to an attribute on the input as well)... however, invariably, the mirror will get lost at some stage and stop recognising where various changes go ('ouch' errors thrown), and I was hoping that the client watching could just tell the mirror to re-initialise the page, send the whole DOM again.
However, I've tried this a number of ways, and none seem to work (see the commented out bits to see what I've tried):
TreeMirrorClient.prototype.refreshDOM = function(){
var rootId = this.serializeNode(this.target).id;
var children = [];
for (var child = this.target.firstChild; child; child = child.nextSibling)
children.push(this.serializeNode(child, true));
console.log("refreshDOM["+rootId+"] ",children);
//this.mirror.initialize(rootId, children);
this.mirror.applyChanged(children);//,children); //Remove all, add all
};
Metadata
Metadata
Assignees
Labels
No labels