-
Notifications
You must be signed in to change notification settings - Fork 14
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
Should we say that application/mathml+xml is a MIME type supported by browsers? #204
Comments
That is the mime type registered for mathml so it would be good if it was supported whatever that means here IANA registration and media type definition https://w3c.github.io/mathml-docs/mathml-media-types/#media-types-mathml |
Discussed in the meeting today and we believe the title of the issue is more general than the actual issue. It is a valid mime type, but is that the question or is this specifically WRT object? |
Yes, so more explanation: There are many MIME types registered at IANA but not all are known by browsers. Unknown MIME types would typically make the browser trigger a "download file" or "open with..." menu. But files with known MIME types like application/xhtml+xml or image/svg+xml will be handled by the browser. If an XML document is served with MIME type application/mathml+xml to the browser, should it be rendered it as a MathML formula instead of treating it as an unknown file? And when opening a file with the "mml", should the browser map this file extension to application/mathml+xml and then render the document as MathML? Currently, it seems support for application/mathml+xml was only implemented in Firefox (in https://bugzilla.mozilla.org/show_bug.cgi?id=124709). WebKit-based and Chromium-based browsers don't know about it. application/mathml-presentation+xml is not supported by any browser. A reftest was added in Firefox to check this support and relying on |
It would be useful to have clear guidelines how (if at all?) one should embed MathML Core in HTML5 - both in terms of getting an embedded formula to render, as well as for allowing it to be "interactive" via scripting. I thought there was more clarity around SVG, but apparently one can in practice use all three of |
In general, we've had a rule of thumb that MathML and SVG live in parallel worlds. So if something works for SVG (and isn't considered a bug), then it should work for MathML. With that in mind, unless what @dginev wrote is considered incorrect behavior, then |
To be clear, I meant in the past it was only possible to use MathML in XML document so probably the options were:
Now that MathML is in HTML5 I suppose (2) has become obsolete and moreover it was not helping with our "math is text" goal (cf issues we've long been discussed when using images for mathematical formulas). I believe that's also a situation where SVG is quite different from MathML, as editing a standalone SVG image and inserting it as an Incidentally, if for some reason one really wants to insert MathML via https://w3c.github.io/mathml-docs/mathml-media-types defines three MIME types and I guess it's fine for XML equation editors, generators etc But the question is whether we really need this MIME type to be recognized by browsers these days? My comment as an implemeter:
|
@fred-wang the main discussion during the MathML 4 charter involving MathML MIME types has been about enabling a math-aware clipboard. That was summarized in a new note document and video for TPAC 2022. I recall I tried to open a discussion on whether there may be a possibility to use the Since we don't have browser vendors on the calls, I think we may not have the freshest sentiments available. (Edit: retracting some details that I am not fully informed on.) |
While checking Firefox reftests, I found the following one which is not passing in Chrome or WebKit:
https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-object-type says
but there does not seem to be an official list of supported MIME type. Should we explicitly state that
application/mathml+xml
is supported? Not sure if this is still relevant now that we have MathML in HTML5.The original Mozilla bug where this was requested is https://bugzilla.mozilla.org/show_bug.cgi?id=124709 ; this is more general than just support for the
<object>
attribute.Searching in the source code:
It is in https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsExternalHelperAppService.cpp#540
It's not in https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:net/base/mime_util.cc
and not in https://searchfox.org/wubkat/source/Source/WebCore/platform/MIMETypeRegistry.cpp (webkit seems to have platform-dependent implementation)
The text was updated successfully, but these errors were encountered: