Use lastIndexOf instead of indexOf in Node.prototype.removeChild
Use lastIndexOf instead of indexOf in Node.prototype.removeChild

The fastest method to remove all children of an element is to loop through all its childNodes in reverse,
because this avoids renumbering the array.
Using lastIndexOf makes this removing all children slightly faster: O(n) instead of O(n^2)

kevinold/jsdom,selam/jsdom,medikoo/jsdom,medikoo/jsdom,Ye-Yong-Chi/jsdom,janusnic/jsdom,kevinold/jsdom,lcstore/jsdom,zaucy/jsdom,vestineo/jsdom,Sebmaster/jsdom,lcstore/jsdom,snuggs/jsdom,crealogix/jsdom,fiftin/jsdom,sirbrillig/jsdom,beni55/jsdom,darobin/jsdom,janusnic/jsdom,AshCoolman/jsdom,sirbrillig/jsdom,jeffcarp/jsdom,robertknight/jsdom,sebmck/jsdom,jeffcarp/jsdom,fiftin/jsdom,susaing/jsdom,beni55/jsdom,mzgol/jsdom,aduyng/jsdom,medikoo/jsdom,jeffcarp/jsdom,lcstore/jsdom,mbostock/jsdom,sirbrillig/jsdom,robertknight/jsdom,kevinold/jsdom,tmpvar/jsdom,Joris-van-der-Wel/jsdom,szarouski/jsdom,Zirro/jsdom,danieljoppi/jsdom,cpojer/jsdom,nicolashenry/jsdom,evanlucas/jsdom,evanlucas/jsdom,mbostock/jsdom,robertknight/jsdom,Ye-Yong-Chi/jsdom,sebmck/jsdom,aduyng/jsdom,AshCoolman/jsdom,tmpvar/jsdom,zaucy/jsdom,danieljoppi/jsdom,nicolashenry/jsdom,sebmck/jsdom,kesla/jsdom,evdevgit/jsdom,zaucy/jsdom,snuggs/jsdom,Sebmaster/jsdom,janusnic/jsdom,evdevgit/jsdom,selam/jsdom,kittens/jsdom,kittens/jsdom,evdevgit/jsdom,Zirro/jsdom,AshCoolman/jsdom,vestineo/jsdom,Ye-Yong-Chi/jsdom,Sebmaster/jsdom,Joris-van-der-Wel/jsdom,crealogix/jsdom,szarouski/jsdom,szarouski/jsdom,mzgol/jsdom,Joris-van-der-Wel/jsdom,kesla/jsdom,cpojer/jsdom,danieljoppi/jsdom,selam/jsdom,evanlucas/jsdom,kesla/jsdom,susaing/jsdom,darobin/jsdom,beni55/jsdom,darobin/jsdom,cpojer/jsdom,vestineo/jsdom,mbostock/jsdom,nicolashenry/jsdom,mzgol/jsdom,kittens/jsdom,aduyng/jsdom,fiftin/jsdom,susaing/jsdom