wlxml: fix argument passing to transformations registered as wlxml class extensions
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 10 Mar 2014 10:29:05 +0000 (11:29 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 10 Mar 2014 10:31:18 +0000 (11:31 +0100)
src/wlxml/wlxml.js

index 9fb6a98..4f6e356 100644 (file)
@@ -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);
         };
     },