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: preserve property case for custom elements #5193

Closed
wants to merge 1 commit into from

Conversation

socsieng
Copy link

Fixes #5184

Heuristics used to determine whether a custom element's property or attribute should be set doesn't support properties that include uppercase characters. This PR preserves property casing when dealing with custom elements.

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR relates to an outstanding issue, so please reference it in your PR, or create an explanatory one for discussion. In many cases, features are absent for a reason.

  • This message body should clearly illustrate what problems it solves. If there are related issues, remember to reference them.

  • Ideally, include a test that fails without this PR but passes with it. PRs will only be merged once they pass CI. (Remember to npm run lint!)

    The updated test fails without the change, works with the change included.

Tests

  • Run the tests with npm test or yarn test)

@stale
Copy link

stale bot commented Jun 26, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale-bot label Jun 26, 2021
@stale stale bot removed the stale-bot label Jun 26, 2021
@stale stale bot removed the stale-bot label Jun 27, 2021
@baseballyama baseballyama added this to the 4.x milestone Feb 26, 2023
@dummdidumm
Copy link
Member

Thank you, but this isn't the right fix. The correct fix (which is implemented since a while now - sorry for letting this go unanswered for so long) is to set the property through an attribute instead if the property doesn't exist on the element, and the custom element is responsible for transforming attributeChanged callbacks correctly; therefore closing.

@dummdidumm dummdidumm closed this Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mixed case custom element properties are unsupported
5 participants