You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Heuristics used to determine whether a custom element's property or attribute should be set doesn't support properties with mixed case names.
This issue 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.
This behavior is correct and in line with how other custom element libraries like Lit do it. In general, DOM attributes are case insensitive and therefore custom element attributes, too - therefore anything is lowercased and then searched for a corresponding prop. With #8457 you'll be able to use kebab-case instead if you want to - closing.
Describe the bug
Heuristics used to determine whether a custom element's property or attribute should be set doesn't support properties with mixed case names.
Example:
Logs
N/A
To Reproduce
https://svelte.dev/repl/f39a2c0f7f4443a48fab079db1884fa3?version=3.24.0
Expected behavior
A clear and concise description of what you expected to happen.
Expected output to include plain element with no attributes set:
And with properties set for
myProperty
andother
.Actual behavior
Because no property exists on the element with lowercase property, it gets added as the attribute
myproperty
and theobj
is coerced tostring
.Stacktraces
Not available
Information about your Svelte project:
Your browser and the version: Chrome 84.0
Your operating system: macOS Catalina
Svelte version: 3.24.0
Whether your project uses Webpack or Rollup: REPL
Severity
I'm in the early stages of evaluating Svelte and not being able to set properties on custom elements will is preventing it from being used.
Additional context
N/A
The text was updated successfully, but these errors were encountered: