const MathQueue = function (elementId) {
    // check MathJax is ready
    if (!window.MathJax.version) return
    // re-render
    // window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub, docEle]);
    MathJax.startup.promise.then(_ => {
        const docEle = elementId && [document.getElementById(elementId)] || undefined
        MathJax.typesetPromise(docEle)
    })
};

export default {
    MathQueue,
}
