custom-elements-everywhere
custom-elements-everywhere copied to clipboard
Add custom element with method
React 19 has a very naïve heuristic for setting props vs attributes; if it detects a property on the custom element with the same name as the attribute, it sets it as a property. This doesn't work if you have a method on the custom element with the same name as an attribute you are trying to set.
- https://github.com/facebook/react/issues/31689
I've attempted to provide a reproduction here; unfortunately this repository does not behave well on Windows or WSL, which are currently my only two options. I will investigate adding support for Windows devs in another PR.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
I'm a little confused to as to how I'm supposed to add a successfully failing test...
This PR now includes tests for all currently supported frameworks. There are many that have now dropped from 100%, mostly I think those using JSX-like syntax. I've tried to check each one's documentation for hints as to how to set attrs rather than props.
Are there any open issues for this new case?
There's at least facebook/react#31689 for React, but it's closed.
I've re-opened it. Is there somewhere in this repo we reference open issues for failing tests?
If there's a chance that https://github.com/webcomponents/custom-elements-everywhere/pull/2474 might get merged soon, I'd rather that get merged before this - deconflicting this on top of that one will more pleasant than vice versa.