wip: extracting core cont'd - allow arbitrary number of arguments to transformation
[fnpeditor.git] / src / smartxml / smartxml.js
index 2ed9c47..b28f8d1 100644 (file)
@@ -235,8 +235,9 @@ var registerTransformation = function(desc, name, target) {
     var Transformation = transformations.createContextTransformation(desc, name);
     //+ to sie powinna nazywac registerTransformationFromDesc or sth
     //+ ew. spr czy nie override (tylko jesli powyzej sa prototypy to trudno do nich dojsc)
-    target[name] = function(args) {
-        var instance = this;
+    target[name] = function() {
+        var instance = this,
+            args = Array.prototype.slice.call(arguments, 0);
         return instance.transform(Transformation, args);
     }
 };