-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
MathML is unsupported #55608
Comments
Interesting, this should work as we do parse this as |
Yeah, there's definitely some level of support for it, the namespace appears correct but then it seems to get the prototype wrong (not even sure how that's possible?). As a guess it's not using createElementNS(), it's doing something else. |
Yeah the compiler output clearly has the MathML support in it. The
It should be |
Prior to this change, MathML element were created with the wrong namespace resulting in regular DOM `Element`. This commit fixes this. Related to angular#55608 (but doesn't fix it entirely).
Prior to this change, MathML element were created with the wrong namespace resulting in regular DOM `Element`. This commit fixes this. Related to angular#55608 (but doesn't fix it entirely).
With #55622 we'll at least get the support for MathML but it will still require |
Prior to this change, MathML element were created with the wrong namespace resulting in regular DOM `Element`. This commit fixes this. Related to angular#55608 (but doesn't fix it entirely).
Prior to this change, MathML element were created with the wrong namespace resulting in regular DOM `Element`. This commit fixes this. Related to angular#55608 (but doesn't fix it entirely).
Yeah that error is because DomSchemaChecker is looking up the definition using the prefixed tagname We should ideally have a branded type for those prefixed tag names, that will likely expose some inconsistencies. |
@JeanMeche great catch! I was just helping someone else with a similar issue where createElementNS was returning an Element and it was an invalid namespace which brought me back here, you're one step ahead though |
Fixes that we didn't have the MathML elements in the schema. Note that we can't discover which tag names are available by looking at globally-available classes, because all MathML elements are `MathMLElement` rather than something like `SVGCircleElement`. As such, I ended up having to hardcode the currently-available tags. Fixes angular#55608.
Fixes that we didn't have the MathML elements in the schema. Note that we can't discover which tag names are available by looking at globally-available classes, because all MathML elements are `MathMLElement` rather than something like `SVGCircleElement`. As such, I ended up having to hardcode the currently-available tags. Fixes angular#55608.
Fixes that we didn't have the MathML elements in the schema. Note that we can't discover which tag names are available by looking at globally-available classes, because all MathML elements are `MathMLElement` rather than something like `SVGCircleElement`. As such, I ended up having to hardcode the currently-available tags. Fixes angular#55608.
Fixes that we didn't have the MathML elements in the schema. Note that we can't discover which tag names are available by looking at globally-available classes, because all MathML elements are `MathMLElement` rather than something like `SVGCircleElement`. As such, I ended up having to hardcode the currently-available tags. Fixes angular#55608.
Fixes that we didn't have the MathML elements in the schema. Note that we can't discover which tag names are available by looking at globally-available classes, because all MathML elements are `MathMLElement` rather than something like `SVGCircleElement`. As such, I ended up having to hardcode the currently-available tags. Fixes #55608. PR Close #55631
Fixes that we didn't have the MathML elements in the schema. Note that we can't discover which tag names are available by looking at globally-available classes, because all MathML elements are `MathMLElement` rather than something like `SVGCircleElement`. As such, I ended up having to hardcode the currently-available tags. Fixes angular#55608. PR Close angular#55631
Fixes that we didn't have the MathML elements in the schema. Note that we can't discover which tag names are available by looking at globally-available classes, because all MathML elements are `MathMLElement` rather than something like `SVGCircleElement`. As such, I ended up having to hardcode the currently-available tags. Fixes angular#55608. PR Close angular#55631
Fixes that we didn't have the MathML elements in the schema. Note that we can't discover which tag names are available by looking at globally-available classes, because all MathML elements are `MathMLElement` rather than something like `SVGCircleElement`. As such, I ended up having to hardcode the currently-available tags. Fixes angular#55608. PR Close angular#55631
Fixes that we didn't have the MathML elements in the schema. Note that we can't discover which tag names are available by looking at globally-available classes, because all MathML elements are `MathMLElement` rather than something like `SVGCircleElement`. As such, I ended up having to hardcode the currently-available tags. Fixes #55608. PR Close #55631 PR Close #55645
Would be good to reopen this issue until #55622 is merged (or go ahead and merge that as it's approved) |
@lukewarlow Yes, we're looking at landing this "fix" into 17.3 and the upcomming 18.0 ! |
Prior to this change, MathML element were created with the wrong namespace resulting in regular DOM `Element`. This commit fixes this. Related to angular#55608 (but doesn't fix it entirely).
Closing this now that the second PR has been merged. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
When trying to use MathML in an angular template you get a warning that
<math>
it's an unrecognised element. If you disable this warning by addingschemas: [NO_ERRORS_SCHEMA]
it doesn't render correctly. At first glance they seem correct because the produced elements are in the MathML namespace (something other frameworks can get wrong) but the element's prototype is justElement
rather thanMathMLElement
.Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/github-tdmxzz?file=src%2Fmain.ts
Please provide the exception or error you saw
The text was updated successfully, but these errors were encountered: