From fa4314aeea0e8c20f15dad390f0ab4a670ee5cdb Mon Sep 17 00:00:00 2001 From: Juriy Zaytsev Date: Sat, 30 May 2009 02:26:56 -0400 Subject: [PATCH] No need to overengineer. --- src/dom/dom.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dom/dom.js b/src/dom/dom.js index 1f0924f..14ff976 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -238,9 +238,9 @@ Element.Methods = { if (SELECT_ELEMENT_INNERHTML_BUGGY || TABLE_ELEMENT_INNERHTML_BUGGY) { if (tagName in Element._insertionTranslations.tags) { - $A(element.childNodes).each(function(node) { - element.removeChild(node); - }); + while (element.firstChild) { + element.removeChild(element.firstChild); + } Element._getContentFromAnonymousElement(tagName, content.stripScripts()) .each(function(node) { element.appendChild(node)