From: Aleksander Ɓukasz Date: Mon, 10 Mar 2014 10:29:05 +0000 (+0100) Subject: wlxml: fix argument passing to transformations registered as wlxml class extensions X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/49906096d20853e8ce794225e7ce14147bf112ec?ds=inline wlxml: fix argument passing to transformations registered as wlxml class extensions --- diff --git a/src/wlxml/wlxml.js b/src/wlxml/wlxml.js index 9fb6a98..4f6e356 100644 --- a/src/wlxml/wlxml.js +++ b/src/wlxml/wlxml.js @@ -297,8 +297,9 @@ $.extend(WLXMLDocument.prototype, { registerClassTransformation: function(Transformation, className) { var thisClassTransformations = (this.classTransformations[className] = this.classTransformations[className] || {}); - thisClassTransformations[Transformation.prototype.name] = function(args) { + thisClassTransformations[Transformation.prototype.name] = function() { var nodeInstance = this; + var args = Array.prototype.slice.call(arguments, 0); return nodeInstance.transform(Transformation, args); }; },