From 15ec78f5eff3f8fa74714fe10986be094915c800 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Mon, 28 Mar 2011 17:51:51 -0700 Subject: use document fragments to grow repeaters - unless we are repeating OPTION elements, buffer new nodes in document fragment and append them to the DOM in one go at the end - for OPTION elements we have to keep on using the old way because of how option widget communicates with select widget this should be change, but that change is out of scope of this CL - modify jqLite to support wrapping of document fragments - fix jqLite documentation typo This change unintentionally avoids the following webkit bug that that affects repeater growth: https://bugs.webkit.org/show_bug.cgi?id=57059 However the following bug affecting shrining of repeaters is still unresolved https://bugs.webkit.org/show_bug.cgi?id=57061 --- src/jqLite.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/jqLite.js') diff --git a/src/jqLite.js b/src/jqLite.js index 8554263a..78fc1655 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -66,7 +66,7 @@ function JQLite(element) { div.innerHTML = '
 
' + element; // IE insanity to make NoScope elements work! div.removeChild(div.firstChild); // remove the superfluous div JQLiteAddNodes(this, div.childNodes); - this.remove(); // detach the elements form the temporary DOM div. + this.remove(); // detach the elements from the temporary DOM div. } else { JQLiteAddNodes(this, element); } @@ -136,8 +136,7 @@ function JQLiteAddNodes(root, elements) { ? elements : [ elements ]; for(var i=0; i < elements.length; i++) { - if (elements[i].nodeType != 11) - root.push(elements[i]); + root.push(elements[i]); } } } -- cgit v1.2.3