public/ckeditor/4.4dev/core/dom/node.js
function( includeChildren, cloneId ) {
		var $clone = this.$.cloneNode( includeChildren );

		var removeIds = function( node ) {
				// Reset data-cke-expando only when has been cloned (IE and only for some types of objects).
				if ( node[ 'data-cke-expando' ] )
					node[ 'data-cke-expando' ] = false;

				if ( node.nodeType != CKEDITOR.NODE_ELEMENT )
					return;
				if ( !cloneId )
					node.removeAttribute( 'id', false );

				if ( includeChildren ) {
					var childs = node.childNodes;
					for ( var i = 0; i < childs.length; i++ )
						removeIds( childs[ i ] );
				}
			};

		// The "id" attribute should never be cloned to avoid duplication.
		removeIds( $clone );

		return new CKEDITOR.dom.node( $clone );
	}
function( includeChildren, cloneId ) {
		var $clone = this.$.cloneNode( includeChildren );

		var removeIds = function( node ) {
				// Reset data-cke-expando only when has been cloned (IE and only for some types of objects).
				if ( node[ 'data-cke-expando' ] )
					node[ 'data-cke-expando' ] = false;

				if ( node.nodeType != CKEDITOR.NODE_ELEMENT )
					return;
				if ( !cloneId )
					node.removeAttribute( 'id', false );

				if ( includeChildren ) {
					var childs = node.childNodes;
					for ( var i = 0; i < childs.length; i++ )
						removeIds( childs[ i ] );
				}
			};

		// The "id" attribute should never be cloned to avoid duplication.
		removeIds( $clone );

		return new CKEDITOR.dom.node( $clone );
	}
function ( includeChildren , cloneId ) { var $clone = this . $ . cloneNode ( includeChildren ) ; var removeIds = function ( node ) { // Reset data-cke-expando only when has been cloned (IE and only for some types of objects). if ( node [ 'data-cke-expando' ] ) node [ 'data-cke-expando' ] = false ; if ( node . nodeType != CKEDITOR . NODE_ELEMENT ) return ; if ( ! cloneId ) node . removeAttribute ( 'id' , false ) ; if ( includeChildren ) { var childs = node . childNodes ; for ( var i = 0 ; i < childs . length ; i ++ ) removeIds ( childs [ i ] ) ; } } ; // The "id" attribute should never be cloned to avoid duplication. removeIds ( $clone ) ; return new CKEDITOR . dom . node ( $clone ) ; }
Clones this node.

**Note**: Values set by {#setCustomData} will not be available in the clone.

@param {Boolean} [includeChildren=false] If `true` then all node's
children will be cloned recursively.
@param {Boolean} [cloneId=false] Whether ID attributes should be cloned, too.
@returns {CKEDITOR.dom.node} Clone of this node.
Clones this node .