Skip to content
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

fix: add missing name attribute for details html element #6188

Merged
merged 1 commit into from
Mar 8, 2025

Conversation

s-gurevich
Copy link
Contributor

What is the current behavior?

I wanted to use the details html element with the name property in Stencil's TSX and got the error:

Type '{ name: string; }' is not assignable to type 'DetailsHTMLAttributes<HTMLElement>'.Property 'name' does
           not exist on type 'DetailsHTMLAttributes<HTMLElement>'.

The name property seems to be missing here:

export interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {

The name attribute is part of the web standard and allows grouping multiple details elements: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details#multiple_named_disclosure_boxes

GitHub Issue Number: N/A

What is the new behavior?

The name attribute is added to the definitions and can be used in TSX.

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Testing

Other information

@s-gurevich s-gurevich requested a review from a team as a code owner March 7, 2025 16:14
Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thanks a lot!

@christian-bromann christian-bromann merged commit aa1bc62 into stenciljs:main Mar 8, 2025
139 of 142 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants