- loadXML: function(xml) {
- var $document = $(parseXML(xml));
-
- var doc = this;
- Object.defineProperty(this, 'root', {get: function() {
- return doc.createElementNode($document[0]);
- }, configurable: true});
- Object.defineProperty(this, 'dom', {get: function() {
- return $document[0];
- }, configurable: true});
-
- this.trigger('contentSet');
+ loadXML: function(xml, options) {
+ options = options || {};
+ defineDocumentProperties(this, $(parseXML(xml)));
+ if(!options.silent) {
+ this.trigger('contentSet');
+ }