-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOMParser and MathML #8866
Comments
|
Sorry for the lack of clarity. The latter doesn't work, it renders plain text. 🎉 for The only reason I'd see to pursue adding a MathML mime type to |
In order to use MathML with XML syntax, you need to use the MathML namespace. That is If you want to use the HTML syntax for MathML, you could just use something like |
Thanks @andreubotella, my bad, indeed, I picked a MathML sample from the Web and didn't check the XML name space. So My use case is the We use some logic that looks like your suggestion for SVG, but is built on top of The optimal solution in any case would be to rely on something like Thanks for your input! |
Now that all major engines support MathML once again, it would be nice to have the ability to parse it from JS without
.innerHTML
hacks.Could the list of supported mime types for
DOMParser.prototype.parseFromString
be updated to accept MathML?I suppose that the go-to type would be
application/mathml xml
which is what the W3C uses in the generic case.The Wikidata page about MathML lists
text/mathml
which is mentioned in older standards. It is terser and more memorable, but I suppose it won't fly...Using
text/xml
is not enough to get MathML to renderThe text was updated successfully, but these errors were encountered: