src/xblocks/block.js
function (deep) {
        // not to clone the contents
        const node = dom.cloneNode(this, false);
        dom.upgrade(node);

        node[ Constants.TMPL ] = this[ Constants.TMPL ];
        node[ Constants.INSERTED ] = false;

        if (deep) {
            node.content = this.content;
        }

        // ???
        // if ('checked' in this) clone.checked = this.checked;

        return node;
    }
function (deep) {
        // not to clone the contents
        const node = dom.cloneNode(this, false);
        dom.upgrade(node);

        node[ Constants.TMPL ] = this[ Constants.TMPL ];
        node[ Constants.INSERTED ] = false;

        if (deep) {
            node.content = this.content;
        }

        // ???
        // if ('checked' in this) clone.checked = this.checked;

        return node;
    }
Cloning a node.
@param {boolean} deep true if the content to be saved
@returns {HTMLElement}