Define missing DomElement.remove().

This commit is contained in:
Jürg Lehni 2012-11-14 12:06:53 -08:00
parent a646f922d4
commit fbe8095d1b

View file

@ -130,6 +130,11 @@ var DomElement = new function() {
new RegExp('\\s*' + cls + '\\s*'), ' ').trim();
},
remove: function(el) {
if (el.parentNode)
el.parentNode.removeChild(el);
},
removeChildren: function(el) {
while (el.firstChild)
el.removeChild(el.firstChild);