use mathjax3 in andriod5 show error "getExplicit of null"
Issue Summary A summary of the issue and the browser/OS environment in which it occurs. If suitable, include the steps required to reproduce the bug.
Steps to Reproduce: This is the first step This is the second step Further steps, etc. Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?
Technical details: MathJax Version: 3.2 Client OS: Mac OS X 11.5.2 I am using the following MathJax configuration:
window.MathJax = {
chtml: {
matchFontHeight: false,
mtextInheritFont: false
},
options: {
renderActions: {
addMenu: [],
checkLoading: []
},
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code', 'a'],
includeHtmlTags: {
br: '\n',
wbr: '',
'#comment': ''
},
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
tex: {
inlineMath: [['<latex>', '</latex>'], ['$', '$'], ['_mathjax_','_mathjax_'], ['$','$'], ['$$','$$'], ['\\(','\\)']],
displayMath: [],
macros: {
ykparallelogram: '\\unicode{x25B1}',
ykparallel: '//'
},
autoload: {
color: [],
colorV2: ['color']
},
packages: {
'[+]': ['trap-undefined'],
'[-]': ['noundefined']
}
},
loader: {
load: ['[tex]/noerrors']
},
startup: {
ready: function () {
var tex = null;
var Configuration = MathJax._.input.tex.Configuration.Configuration;
var TexError = MathJax._.input.tex.TexError.default;
Configuration.create('trap-undefined', {
fallback: {
macro: function (parser, cs) {
tex.inputData.codecogs = true;
},
environment: function (parser, env) {
tex.inputData.codecogs = true;
}
}
});
var toDOM = function (math, node, html) {
this.setDocument(html);
if (math.inputData.codecogs) {
var adaptor = html.adaptor;
if (math.display) adaptor.setAttribute(node, 'display', true);
var imageNode = adaptor.node('img', {
src: 'https://gallery.fbcontent.cn/latex?decode=false&fontSize=34&latex=' + encodeURIComponent(math.math.trim() + '\\quad'),
alt: tex.math.trim()
})
imageNode.onload = function () {
imageNode.style.height = imageNode.naturalHeight / 2 + 'px'
imageNode.style.width = imageNode.naturalWidth / 2 + 'px'
}
html.adaptor.append(node, imageNode);
math.display = null;
} else {
this._toDOM(math, node, html);
}
};
var getOutputJax = MathJax.startup.getOutputJax;
MathJax.startup.getOutputJax = function () {
var output = getOutputJax();
output._toDOM = output.toDOM;
output.toDOM = toDOM;
return output;
}
MathJax.startup.defaultReady();
MathJax.startup.input[0].preFilters.add(function (filter) {
var math = filter.math
tex = math
});
MathJax.startup.output._toDOM = MathJax.startup.output.toDOM;
MathJax.startup.output.toDOM = toDOM;
}
}
}
and loading MathJax via
Sorry, I need your help! I have an issue with the same problem,but I check my polyfill.js , It's not the same thing. please help me review this file: https://xyst.yuanfudao.com/h5/solar-web-resultspage/polyfill.js