Skip to content

Conversation

@ijlee2
Copy link
Contributor

@ijlee2 ijlee2 commented Nov 17, 2025

Background

Closes #1022.

  • Found duplicate and missing entries in GlintHtmlElementAttributesMap.
  • Split mappings for HTMLElement and SVGElement to improve performance (runtime should be back to what it was for @glint/[email protected])
    • The divide-and-conquer only reduced the runtime from ~24s to ~22s.
    • The removal of unnecessary computations further reduced the runtime.
  • Sorted keys for GlintHtmlElementAttributesMap, GlintSvgElementAttributesMap, HTMLElementMap, and SVGElementMap to help with maintenance.

@NullVoxPopuli
Copy link
Contributor

tysm for working on this <3

{
"category": "message",
"code": 6500,
"message": "The expected type comes from property 'onclick' which is declared here on type 'Partial<AttributesForElement<HTMLDivElement>>'",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE for me -- I think we can explode this out to list the actual available attributes by doing something like & {}

@ijlee2 ijlee2 marked this pull request as ready for review November 17, 2025 20:01
@NullVoxPopuli NullVoxPopuli added the bug Something isn't working label Nov 17, 2025
Comment on lines 694 to 699
['HTMLBodyElement']: GlobalHTMLAttributes;
['HTMLDataListElement']: GlobalHTMLAttributes;
['HTMLHtmlElement']: GlobalHTMLAttributes;
['HTMLPictureElement']: GlobalHTMLAttributes;
['HTMLSpanElement']: GlobalHTMLAttributes;
['HTMLTitleElement']: GlobalHTMLAttributes;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GlobalHTMLAttributes may not be the correct thing to use. For simplicity, I used it like the default value that we see for HTMLElement on line 693.

If there's a better Attributes type to use, I suggest making the change in a separate pull request.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good to me

@NullVoxPopuli NullVoxPopuli merged commit 07406b3 into typed-ember:main Nov 17, 2025
6 checks passed
@github-actions github-actions bot mentioned this pull request Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is glint v2 supposed to be slower?

2 participants