// DocumentElement represents a text or an element node from WLXML document rendered inside Canvas
var DocumentElement = function(wlxmlNode, canvas) {
- if(arguments.length === 0) {
- return;
- }
this.wlxmlNode = wlxmlNode;
this.canvas = canvas;
return element;
};
-DocumentNodeElement.prototype = new DocumentElement();
+DocumentNodeElement.prototype = Object.create(DocumentElement.prototype);
$.extend(DocumentNodeElement.prototype, {
}
});
-DocumentTextElement.prototype = new DocumentElement();
+DocumentTextElement.prototype = Object.create(DocumentElement.prototype);
$.extend(DocumentTextElement.prototype, {
createDOM: function() {