bug in "asciimath.js":It cannot run in strict mode, and three global variables are accidentally defined.
Created by: masx200
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.
https://cdn.jsdelivr.net/npm/mathjax@3.2.0/es5/input/asciimath.min.js
bug in "asciimath.js":It cannot run in strict mode, and three global variables are accidentally defined.
"mathfontfamily"
"mathfontsize"
"value"
Steps to Reproduce:
- This is the first step Don't run it in strict mode.
<script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.0/es5/startup.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.0/es5/core.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.0/es5/input/asciimath.min.js"></script>
console.log(Object.keys(window))
- This is the second step Run it in strict mode.
await import('https://cdn.jsdelivr.net/npm/mathjax@3.2.0/es5/startup.min.js')
startup.min.js:5 MathJax(?): Cannot read property 'MmlTree' of undefined
await import('https://cdn.jsdelivr.net/npm/mathjax@3.2.0/es5/core.min.js')
await import('https://cdn.jsdelivr.net/npm/mathjax@3.2.0/es5/input/asciimath.min.js')
asciimath.min.js:6 Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
at new constructor (asciimath.min.js:5)
at Function.Subclass (asciimath.min.js:5)
at asciimath.min.js:5
at Object.24 (asciimath.min.js:5)
at i (asciimath.min.js:5)
at Object.406 (asciimath.min.js:5)
at i (asciimath.min.js:5)
at Object.884 (asciimath.min.js:5)
at i (asciimath.min.js:5)
at asciimath.min.js:5
- 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.0
- Client OS: Microsoft Windows [版本 10.0.19043.1110]
- Browser: Chrome 92.0.902.55
Supporting information:
- Please supply a link to a (live) minimal example page, when possible.
- If your issue is with the display of the mathematics produced by MathJax, include a screen snapshot that illustrates the problem, when possible.
- Check your browser console window for any error messages, and include them here.
- Include the MathJax configuration you are using, and the script tag that loads MathJax itself.