Skip to content

MathJax v4 error: this.parent(...) is null #3130

@hbghlyj

Description

@hbghlyj

I'm loading MathJax in a simple HTML webpage, via jsdelivr

<!DOCTYPE html>
<html>
<head>
  <script>window.MathJax = {
      startup: {
        pageReady: function () {
          MathJax.typesetPromise([document.body]);
          return MathJax.startup.defaultPageReady();
        }
      }
    };
  </script>
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js"></script>
</head>

<body>
  <div>\(\mathbb{Q}\)
  </div>
</body>

</html>

Firefox throws error at tex-mml-chtml.js line 1 column 41740:

image

Uncaught (in promise) TypeError: this.parent(...) is null
    replace https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    updateDocument https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    updateDocument https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    updateDocument https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    updateDocument https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    updateDocument https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    methodActions https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    renderDoc https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    render https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    n https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    t https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    t https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    promise callback*t https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    t https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    promise callback*t https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    Mn https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    n https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    defaultPageReady https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    pageReady file:///this file.htm:9
    defaultReady https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    promise callback*e.defaultReady https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    defaultReady https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    <anonymous> https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    promise callback* https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    <anonymous> https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    loadFont https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    <anonymous> https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    <anonymous> https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    <anonymous> https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1
    <anonymous> https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js:1

Chrome also throws error: Uncaught (in promise) TypeError: Cannot read properties of null (reading 'replaceChild')

image
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'replaceChild')

Metadata

Metadata

Assignees

No one assigned

    Labels

    AcceptedIssue has been reproduced by MathJax teamCode ExampleContains an illustrative code example, solution, or work-aroundFixedTest Neededv4v4.0

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions