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

Method toNode

static/katex/katex.mjs:6764–6772  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

6762
6763
6764 toNode() {
6765 if (this.character) {
6766 return document.createTextNode(this.character);
6767 } else {
6768 const node = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace");
6769 node.setAttribute("width", this.width + "em");
6770 return node;
6771 }
6772 }
6773 /**
6774 * Converts the math node into an HTML markup string.
6775 */

Callers

nothing calls this directly

Calls 1

setAttributeMethod · 0.45

Tested by

no test coverage detected