[Jifty-commit] r3424 - jifty/trunk/share/web/static/js
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Jun 10 02:04:17 EDT 2007
Author: clkao
Date: Sun Jun 10 02:04:16 2007
New Revision: 3424
Modified:
jifty/trunk/share/web/static/js/jifty.js
Log:
For post fragment update script evaluation, use YUI OnAvailable
rather than hardcoded setTimeout.
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 Jun 10 02:04:16 2007
@@ -690,9 +690,11 @@
} else {
Element.update(element, textContent.stripScripts());
}
- // We need to give the browser some "settle" time before we eval scripts in the body
- setTimeout((function() { this.evalScripts() }).bind(textContent), 10);
- Behaviour.apply(element);
+ // We need to give the browser some "settle" time before
+ // we eval scripts in the body
+ YAHOO.util.Event.onAvailable(element.id, function() {
+ (function() { this.evalScripts() }).bind(textContent)();
+ Behaviour.apply(element) });
}
}
dom_fragment.setArgs(new_dom_args);
More information about the Jifty-commit
mailing list