From 1eebf7be27d533a4b8ca1dba2c64e574dee8e17d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Thu, 24 Oct 2013 10:06:15 +0200 Subject: [PATCH] Allow for muting contentSet event in smartxml.loadXML if desired --- src/smartxml/smartxml.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index f4aa9fe..b81b0f0 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -242,10 +242,12 @@ $.extend(Document.prototype, Backbone.Events, { return new this.TextNodeFactory(nativeNode, this); }, - loadXML: function(xml) { + loadXML: function(xml, options) { + options = options || {}; defineDocumentProperties(this, $(parseXML(xml))); - - this.trigger('contentSet'); + if(!options.silent) { + this.trigger('contentSet'); + } }, toXML: function() { -- 2.20.1