Here you can find the source of remove()
Element.prototype.remove = function ()
{
this.parentElement.removeChild(this);
};
Element.prototype.remove = function() {
this.parentElement.removeChild(this);
Element.prototype.remove = function() {
this.parentElement.removeChild(this);
HTMLElement.prototype.remove = function(element){ this.removeChild(element); }; NodeList.prototype.forEach = function(obj, func){ Array.prototype.forEach.call(obj, func(x)); };
Element.prototype.removeChildren = function() { while (this.firstChild) this.removeChild(this.firstChild); };
HTMLElement.prototype.removeAll = function removeAll() { if (this.hasChildNodes()) { while (this.childNodes.length > 0) { this.removeChild(this.firstChild); };
Element.prototype.empty = function() { while (this.firstChild) this.removeChild(this.firstChild);