define([

], function () {

    function removeElement (node) {
        var parent = node.parentNode;
        while (node.hasChildNodes()) {
            node.removeChild(node.lastChild);
        }
        if (parent) {
            parent.removeChild(node);
        }
        return parent;
    }

    return removeElement;
});

define([

], function () {

    function removeElement (node, removeParent) {
        var parent = node.parentNode;
        while (node.hasChildNodes()) {
            node.removeChild(node.lastChild);
        }
        if (removeParent && parent) {
            parent.removeChild(node);
        }
        return parent;
    }

    return removeElement;
});

Swap action and replace action for components
Swap action and replace action for components
