From fbe8095d1b04cba841b9a0fba0ab5e7bd7f9ca27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 14 Nov 2012 12:06:53 -0800 Subject: [PATCH] Define missing DomElement.remove(). --- src/browser/DomElement.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/browser/DomElement.js b/src/browser/DomElement.js index f8d31216..d14fda1c 100644 --- a/src/browser/DomElement.js +++ b/src/browser/DomElement.js @@ -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);