+ setTag: function(tagName) {
+ var node = this.document.createElementNode({tagName: tagName}),
+ oldTagName = this.getTagName(),
+ myContents = this._$.contents();
+
+ this.getAttrs().forEach(function(attribute) {
+ node.setAttr(attribute.name, attribute.value, true);
+ });
+ node.setData(this.getData());
+
+ if(this.sameNode(this.document.root)) {
+ defineDocumentProperties(this.document, node._$);
+ }
+ this._$.replaceWith(node._$);
+ this._setNativeNode(node._$[0]);
+ this._$.append(myContents);
+ this.triggerChangeEvent('nodeTagChange', {oldTagName: oldTagName, newTagName: this.getTagName()});
+ },
+