X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/2a63804a0f4838a7016c84735df10dde26f8bb38..4ebb1730539288b8198f6db38b0ac9d56b0e521d:/src/smartxml/smartxml.js diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index b28f8d1..60ed6a0 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -299,8 +299,15 @@ $.extend(Document.prototype, Backbone.Events, { var toret = new Factory(from, this); _.extend(toret, this._nodeMethods); _.extend(toret, typeMethods); + _.extend(toret, this._nodeTransformations); _.extend(toret, typeTransformations); + + toret.__super__ = _.extend({}, this._nodeMethods, this._nodeTransformations); + _.keys(toret.__super__).forEach(function(key) { + toret.__super__[key] = _.bind(toret.__super__[key], toret); + }); + return toret; },