MCPcopy Create free account
hub / github.com/TruthHun/BookStack / toNode

Method toNode

static/katex/katex.mjs:6635–6649  ·  view source on GitHub ↗

* Converts the math node into a MathML-namespaced DOM element.

()

Source from the content-addressed store, hash-verified

6633
6634
6635 toNode() {
6636 const node = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type);
6637
6638 for (const attr in this.attributes) {
6639 if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
6640 node.setAttribute(attr, this.attributes[attr]);
6641 }
6642 }
6643
6644 for (let i = 0; i < this.children.length; i++) {
6645 node.appendChild(this.children[i].toNode());
6646 }
6647
6648 return node;
6649 }
6650 /**
6651 * Converts the math node into an HTML markup string.
6652 */

Callers

nothing calls this directly

Calls 2

setAttributeMethod · 0.45
toNodeMethod · 0.45

Tested by

no test coverage detected