I'm not sure that Javascript can interact with the source, though, it usually interacts with the DOM, which gets changed by JsMath, so we would need to functions: the first which gets called before JsMath and stores the current content of the Div, and the second which compares that to the result after JsMath. Or, more simply, call JsMath twice anyway; once the fonts are loaded, the second call takes a negligible time.
]]>For now, my "solution" is to to have the "(Re)process math" link under the tip in the dashed box in the right hand column and hope that the problem goes away when we switch to MathJax. If there's a more convenient place for the "(Re)process math" link, I'm happy to move it.
]]>