* Converts the math node into a MathML-namespaced DOM element.
()
| 221 | * Converts the math node into a MathML-namespaced DOM element. |
| 222 | */ |
| 223 | toNode(): Node { |
| 224 | if (this.character) { |
| 225 | return document.createTextNode(this.character); |
| 226 | } else { |
| 227 | const node = document.createElementNS( |
| 228 | "http://www.w3.org/1998/Math/MathML", "mspace"); |
| 229 | node.setAttribute("width", makeEm(this.width)); |
| 230 | return node; |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | /** |
| 235 | * Converts the math node into an HTML markup string. |
nothing calls this directly
no test coverage detected