v2.7.9 multiple typeset at the same time, only first call get expected output
Created by: littlee
Issue Summary
call MathJax.Hub.Typeset
multiple times at the same time, only the first one call get expected output result
Steps to Reproduce:
HTML code
<!DOCTYPE html>
<html>
<head>
<title>Parcel Sandbox</title>
<meta charset="UTF-8" />
<script src="https://unpkg.com/mathjax@2.7.9/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script>
MathJax.Hub.Register.StartupHook("TeX Jax Ready", () => {
console.log("????");
setTimeout(() => {
render(document.querySelector(".r1"));
render(document.querySelector(".r2"));
}, 1000);
});
function
function render(elem) {
elem.innerHTML = "\\(\\triangle ABC\\)";
MathJax.Hub.Typeset(elem, () => {
console.log("typeset", elem);
});
}
</script>
</head>
<body>
<div id="app">
<div class="r1"></div>
<div class="r2"></div>
</div>
</body>
</html>
from the render result, we can see that .r1
has SVG output, but .r2
has HTML ouput
Technical details:
- MathJax Version: 2.7.9
- Client OS: macOS 11.4
- Browser: Chrome 91.0.4472.114
Supporting information:
reproduce demo: https://codesandbox.io/s/nifty-swartz-18qpv?file=/index.html:0-771