function cloneAnyNode(element, deep) {
    switch (element.nodeType) {
        case Node.DOCUMENT_FRAGMENT_NODE:
            return cloneDocumentFragment(element, deep);
        case Node.ELEMENT_NODE:
            return cloneElementNode(element, deep);
        case Node.TEXT_NODE:
            return cloneTextNode(element);
        default:
            throw new DOMException(DOMException.DATA_CLONE_ERR);
    }
}
function cloneAnyNode(element, deep) {
    switch (element.nodeType) {
        case Node.DOCUMENT_FRAGMENT_NODE:
            return cloneDocumentFragment(element, deep);
        case Node.ELEMENT_NODE:
            return cloneElementNode(element, deep);
        case Node.TEXT_NODE:
            return cloneTextNode(element);
        default:
            throw new DOMException(DOMException.DATA_CLONE_ERR);
    }
}
function cloneAnyNode ( element , deep ) { switch ( element . nodeType ) { case Node . DOCUMENT_FRAGMENT_NODE : return cloneDocumentFragment ( element , deep ) ; case Node . ELEMENT_NODE : return cloneElementNode ( element , deep ) ; case Node . TEXT_NODE : return cloneTextNode ( element ) ; default : throw new DOMException ( DOMException . DATA_CLONE_ERR ) ; } }
Function return copy of element and if request deep copy of element

@param {ParentNode|Node} element
@param {boolean} deep
@ignore
Function return copy of element and if request deep copy of element