From 244069816a8fee98668c70b65b84d327cb0b07e1 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sat, 1 Jan 2011 16:42:20 -0500 Subject: [PATCH] Since loadComplete calls Config and Startup, which require the page body to be nodified, wait for the onload handler to call loadComplete --- unpacked/jax/output/HTML-CSS/jax.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js index c58722c4b..886453816 100644 --- a/unpacked/jax/output/HTML-CSS/jax.js +++ b/unpacked/jax/output/HTML-CSS/jax.js @@ -2103,8 +2103,13 @@ // but can't call loadComplete within the callback for "mml Jax Ready" // (it would call HTMLCSS's Require routine, asking for the mml jax again) // so wait until after the mml jax has finished processing. + // + // We also need to wait for the onload handler to run, since the loadComplete + // will call Config and Startup, which need to modify the body. // - setTimeout(MathJax.Callback(["loadComplete",HTMLCSS,"jax.js"]),0); + MathJax.Hub.Register.StartupHook("onLoad",function () { + setTimeout(MathJax.Callback(["loadComplete",HTMLCSS,"jax.js"]),0); + }); }); //