fixes#14391
In #13337 the "when to set as a property" logic for custom elements was adjusted. A bug was introduced during this, and it consists of several parts, of which the latter I'm not sure what's the best solution, hence opening this to discuss.
The problem is that during set_custom_element_data, get_setters is the only check done to differentiate between setting the value as a prop (has a setter) or as an attribute (doesn't have a setter).
The solution is to take into account whether or not the custom element is already registered, and defer getting (and caching) its setters until then. Instead, fall back to a "an object is always set as a prop" heuristic.
* chore: provide links to documentation for errors/warnings
closes#11305
* changeset
* fix most of the tests
* fix mutations messing with nodes between runs
* more concise
* more test fixes
* last one
* docs: more details for errors/warnings on the site
Related to #11305
* Apply suggestions from code review
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* fix in correct place
* tab not spaces
* tweaks
* fix
* Apply suggestions from code review
* regenerate
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* feat: add Spring class
* add some docs, Spring.of static method
* add Tween class
* lint
* preserveMomentum in milliseconds
* deprecate tweened
* changeset
* wrestle with types
* more consolidation
* flesh out the distinction a bit more, deprecate `subscribe`
---------
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
* chore: make if blocks dead code eliminable
* chore: make if blocks dead code eliminable
* chore: make if blocks dead code eliminable
* address feedback
* address feedback
* prettier
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
When the `value` or `checked` attribute of an input or the contents of a textarea were static, setting the `defaulValue/defaultChecked` property caused the latter to take precedence over the former. This is due to how we transform the code: If the value is static, we put it onto
* tests
* typings
* implement for defaultValue/defaultChecked on inputs
* docs (draft)
* selected
* fix test
* remove
* tweak
* changeset
* untrack reads, they could be inside an effect
* Apply suggestions from code review
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* handle select reset case
* handle reset case specifically: use different props/queries in that case
* enhance test
* fix
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* fix: better error messages for invalid HTML trees
closes#13331
* fix test
* more concise
* tweak
* tweak messages
* adjust tests
* tweak message slightly, so it doesn't sound like the bad element is the one we're currently encountering
* put locations in generated message
* tidy up
* consistency
* fix
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>