From e4c946c8c760c8f1d9c2c1a7abfafedafaca21e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Mon, 27 Jan 2014 11:51:39 +0100 Subject: [PATCH] smartxml: transaction wrapper --- src/smartxml/smartxml.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index d87ec54..d085742 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -574,6 +574,12 @@ $.extend(Document.prototype, Backbone.Events, { } }, + transaction: function(callback, context) { + this.startTransaction(); + callback.call(context); + this.endTransaction(); + }, + getNodeByPath: function(path) { var toret = this.root; path.forEach(function(idx) { -- 2.20.1