smartxml: Document.transaction now returns value from a callback
[fnpeditor.git] / src / smartxml / smartxml.js
index 203bdb2..1e7fc21 100644 (file)
@@ -582,9 +582,11 @@ $.extend(Document.prototype, Backbone.Events, {
     },
 
     transaction: function(callback, context) {
+        var toret;
         this.startTransaction();
-        callback.call(context);
+        toret = callback.call(context);
         this.endTransaction();
+        return toret;
     },
 
     getNodeByPath: function(path) {