Removes an element from DOM in a safe way, cleaning all its controls (including descendants).
Element to remove
Optional
Whether to hide the element's parentNode if it contains no additional children.
removeElement
Removes an element from DOM in a safe way, cleaning all its controls (including descendants).