When catching data-mjx-error attribute exceptions, when the content of the formula changes, the last exception will reappear. How to clear the cache?
Is your feature request related to a problem? Please describe. For example, to update the content of the formula, the previous exception will also be triggered when the current content is rendered
Describe the solution you'd like Hope to clear the exception that occurred last time.
Additional context
MathJax = {
options: {
renderActions: {
handleErrors: [199,
(doc) => {for (const math of doc.math) MathJax.config.handleError(math)},
(doc, math) => MathJax.config.handleError(math)
]
}
},
handleError(math) {
const node = math.root.childNodes[0];
console.log('>>>>>>>>>>>>>>>>>handleError', math.math.trim(), window._questionImageId, window._questionToken)
if (node && node.childNodes[0] && node.childNodes[0].attributes.get('data-mjx-error')) {
window.sendMessage && window.sendMessage('/event/check-apollo/dataMjxError', {
pageName: 'check',
codecogs: math.inputData.codecogs,
latex: math.math.trim(),
queryId: window._questionQueryId,
imageId: window._questionImageId,
questionToken: window._questionToken
})
}
}
};

