typed-ember / glint

TypeScript powered tooling for Glimmer templates
https://typed-ember.gitbook.io/glint
MIT License
109 stars 51 forks source link

<math> wrongly typed as Element instead of MathMlElement #758

Open jelhan opened 3 weeks ago

jelhan commented 3 weeks ago

Glint types <math> as Element. It should be the more specific MathMlElement.

This is an issue in some cases. E.g. Element does not implement ElementCSSInlineStyle, which MathMlElement does. This breaks usage of ember-style-modifier on <math> elements as documented by this failing test: https://github.com/jelhan/ember-style-modifier/pull/237

There is already a special handing for SVGElement in Glint: https://github.com/typed-ember/glint/blob/01b8deb15cb4c29652bcc336cd0782d3b6105bda/packages/template/-private/dsl/types.d.ts#L7-L17 This needs to be extended to cover MathMlElement as well.