fix(view): fix pjax support for mathjax
parent
84ed7e7e66
commit
c0e66df6cc
|
@ -32,11 +32,18 @@
|
||||||
// // TODO pace start loading animation
|
// // TODO pace start loading animation
|
||||||
// })
|
// })
|
||||||
|
|
||||||
// // Listen for completion of Pjax
|
// Listen for completion of Pjax
|
||||||
// document.addEventListener('pjax:complete', function() {
|
document.addEventListener('pjax:complete', () => {
|
||||||
// return;
|
// MathJax reload logic
|
||||||
// // TODO pace stop loading animation
|
if (window.MathJax) {
|
||||||
// })
|
try {
|
||||||
|
window.MathJax.typesetPromise && window.MathJax.typesetPromise();
|
||||||
|
} catch (e) {
|
||||||
|
console.error('MathJax reload error:', e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// TODO pace stop loading animation
|
||||||
|
});
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => initPjax());
|
document.addEventListener('DOMContentLoaded', () => initPjax());
|
||||||
}());
|
}());
|
||||||
|
|
Loading…
Reference in New Issue