Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Jagget
Copy link
Contributor

@Jagget Jagget commented Jul 28, 2025

What is the current behavior?

The HasAttribute member flag only includes String | Number | Boolean | Any types, which means that props with Unknown types (complex objects) are not considered to have attributes. This creates an inconsistency with the Prop flag definition, which includes Unknown types.

What is the new behavior?

The HasAttribute member flag now includes Unknown types (String | Number | Boolean | Any | Unknown), making it consistent with the Prop flag definition. This allows complex object props to properly support attribute-based initialization through JSON string parsing. The added test demonstrates that complex object props can now be correctly initialized via HTML attributes using JSON strings.

Does this introduce a breaking change?

  • Yes
  • No

Testing

Added

@Jagget Jagget marked this pull request as ready for review July 28, 2025 20:12
@Jagget Jagget requested a review from a team as a code owner July 28, 2025 20:12
Copy link
Contributor

@johnjenkins johnjenkins left a comment

Choose a reason for hiding this comment

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

LGTM!

@johnjenkins johnjenkins added this pull request to the merge queue Jul 28, 2025
Merged via the queue into stenciljs:main with commit 7047196 Jul 28, 2025
69 checks passed
@Jagget Jagget deleted the patch-1 branch July 28, 2025 21:46
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