Update $.rmAll according to a new benchmark.

This commit is contained in:
Mayhem 2014-01-27 11:21:32 +01:00
parent 06e5ce4ef6
commit fdca68fe38

View File

@ -102,10 +102,8 @@ $.hasClass = (el, className) ->
$.rm = (el) ->
el.remove()
$.rmAll = (root) ->
# jsperf.com/emptify-element
for node in [root.childNodes...]
node.remove()
return
# https://gist.github.com/MayhemYDG/8646194
root.textContent = null
$.tn = (s) ->
d.createTextNode s
$.nodes = (nodes) ->