X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/058d6f3448085c6f1d513691f8f2d5a12ae1d10a..274b8289ef222d2641b124b6f9c55c63b27af7bb:/src/smartxml/core.js diff --git a/src/smartxml/core.js b/src/smartxml/core.js index bab584e..dd472ce 100644 --- a/src/smartxml/core.js +++ b/src/smartxml/core.js @@ -3,7 +3,8 @@ define([ ], function() { 'use strict'; - +/* globals Node */ +var TEXT_NODE = Node.TEXT_NODE; var INSERTION = function(implementation) { var toret = function(node) { @@ -81,7 +82,7 @@ var elementNodeTransformations = { this.prev().appendText(next.getText()); next.detach(); } - return DocumentNode.prototype.detach.call(this); + return this.__super__.detach(); }, setTag: function(tagName) { @@ -210,7 +211,7 @@ var textNodeTransformations = { _with: {tagName: desc.tagName, attrs: desc.attrs} }); } else { - return DocumentNode.prototype.wrapWith.call(this, desc); + return this.__super__.wrapWith.call(this, desc); } }, @@ -342,7 +343,7 @@ var documentTransformations = { replaceRoot: function(node) { var insertion = this.getNodeInsertion(node); this.root.detach(); - defineDocumentProperties(this, insertion.ofNode._$); + this._defineDocumentProperties(insertion.ofNode._$); insertion.ofNode.triggerChangeEvent('nodeAdded'); return insertion.ofNode; }