Nodejs HTML Element Remove removeAll()

Here you can find the source of removeAll()

Method Source Code

HTMLElement.prototype.removeAll = function removeAll() {
    if (this.hasChildNodes()) {
        while (this.childNodes.length > 0) {
            this.removeChild(this.firstChild);
        }/*from w w  w .  j ava  2s . c  om*/
    }
};

Related

  1. remove()
    Element.prototype.remove = function() {
      this.parentElement.removeChild(this);
    
  2. remove()
    Element.prototype.remove = function() {
        this.parentElement.removeChild(this);
    
  3. remove()
    Element.prototype.remove = function ()
        this.parentElement.removeChild(this);
    };
    
  4. remove(element)
    HTMLElement.prototype.remove = function(element){
        this.removeChild(element);
    };
    NodeList.prototype.forEach = function(obj, func){
        Array.prototype.forEach.call(obj, func(x));
    };
    
  5. removeChildren()
    Element.prototype.removeChildren = function() {
        while (this.firstChild)
            this.removeChild(this.firstChild);
    };
    
  6. empty()
    Element.prototype.empty = function() {
        while (this.firstChild) this.removeChild(this.firstChild);