Conversation
sxzz
left a comment
There was a problem hiding this comment.
It's a breaking change to Vue, right? Can we avoid it?
Maybe we can change API isSVG?: boolean to namespace?: boolean | 'svg' | 'mathml'. If namespace is true then fallback to svg.
I don't think so, since this is only internal code. As far as I can tell, no public APIs have changed. Please correct me if I'm wrong. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Not sure why |
|
@sto3psl It only fails when running on a single thread. Try |
0325357 to
22fc04a
Compare
|
I pushed a commit to fix unit tests. Please don't forget to pull before committing |
|
@sxzz I implemented the backwards compat and reused the type everywhere. Added a comment too that will show up in Intellisense if one wonders why that union type is a bit weird 😄. |
|
I checked why the ecosystem-ci fails for a lot of suits and it's the same reason a lot of core tests failed here first.
It looks like JSDOM doesn't provide |
|
MathMLElement API is introduced in Chrome > 109, so we should do some checks to ensure it's compatible with all ES6 browsers. |
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
|
Seems like Nuxt doesn't like the bundle size increase and naive-ui seems unrelated(?) |
|
@sto3psl Yes I think so! |
|
Since 3.3 is in beta now it would be amazing if this feature could land as well! What do you think @yyx990803? |
|
Hey! Is there anything I can do to get this merged? It would be so nice to have proper MathML support in a future Vue version. |
5d93a55 to
06ad749
Compare
|
See #9249 (comment) I think we should also treat MathML tags as "late added tags" |
|
@sxzz sure I can do that once the mentioned PR has landed. Is there any plan to reset the new tag list with am major update in the future? I assume that these won't stay new forever. Do people that have vue components with reserved names get a runtime warning? |
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>


Implements support for MathML elements in Vue.
Similar to SVG, MathML requires a different namespace when creating elements in the browser. My changes update the widely used
isSVGbool into an enum, supporting SVG, MathML and of course HTML. I mostly copied the SVG related code and adapted it for MathML.This is the first time I'm contributing to a larger project. I'd be very happy about any feedback and suggestions!
Related Issue: #7820