Nodejs Utililty Methods HTML Element Remove

List of utility methods to do HTML Element Remove

Description

The list of methods to do HTML Element Remove are organized into topic(s).

Method

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