This repository has been archived on 2025-08-18. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Bungloo/WebKit/scripts/helper/ConversationNode.js
2013-09-09 00:36:31 +02:00

25 lines
No EOL
490 B
JavaScript

define([
],
function() {
function ConversationNode(dom_node) {
this.dom_node = dom_node;
this.parent = null;
this.children = [];
}
ConversationNode.prototype.addChild = function(node) {
this.children.push(node);
node.parent = this;
};
ConversationNode.prototype.toString = function() {
return "{ \"" + this.dom_node.status.entity + "\": [" + this.children.toString() + "]}";
};
return ConversationNode;
});