[Jifty-commit] r4118 - jifty/trunk/share/web/static/js

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun Sep 16 13:57:15 EDT 2007


Author: clkao
Date: Sun Sep 16 13:57:14 2007
New Revision: 4118

Modified:
   jifty/trunk/share/web/static/js/jifty.js

Log:
Revert r4117 as the element readiness state is not compatible with what it was.

Modified: jifty/trunk/share/web/static/js/jifty.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty.js	(original)
+++ jifty/trunk/share/web/static/js/jifty.js	Sun Sep 16 13:57:14 2007
@@ -826,20 +826,6 @@
     }
 };
 
-// Faster than innerHTML
-function replaceHtml(el, html) {
-	var oldEl = (typeof el === "string" ? document.getElementById(el) : el);
-	/*@cc_on // Pure innerHTML is slightly faster in IE
-		oldEl.innerHTML = html;
-		return oldEl;
-	@*/
-	var newEl = oldEl.cloneNode(false);
-	newEl.innerHTML = html;
-	oldEl.parentNode.replaceChild(newEl, oldEl);
-	/* Since we just removed the old element from the DOM, return a reference
-	to the new element, which can be used to restore variable references. */
-	return newEl;
-};
 
 // Keep track of the state variables.
 var current_args = $H();
@@ -976,7 +962,7 @@
 		var insertion = eval('Insertion.'+f['mode']);
 		new insertion(element, textContent.stripScripts());
 	    } else {
-		replaceHtml(element, textContent.stripScripts());
+		Element.update(element, textContent.stripScripts());
 	    }
 	    // We need to give the browser some "settle" time before
 	    // we eval scripts in the body


More information about the Jifty-commit mailing list