smartxml: cloning a node
[fnpeditor.git] / src / smartxml / smartxml.js
index 6f4677b..a583848 100644 (file)
@@ -36,6 +36,10 @@ $.extend(DocumentNode.prototype, {
         this._$ = $(nativeNode);
     },
 
+    clone: function() {
+        return this.document.createDocumentNode(this._$.clone(true, true)[0]);
+    },
+
     isRoot: function() {
         return this.document.root.sameNode(this);
     },