Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Issues
  • #2748
Closed
Open
Issue created Jul 27, 2021 by Administrator@rootContributor

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:

  1. 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))
  1. 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
  1. 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.
Assignee
Assign to
Time tracking