Update $.rmAll according to a new benchmark.
This commit is contained in:
parent
06e5ce4ef6
commit
fdca68fe38
@ -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) ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user