Null and undefined `value` bindings should always be set to an empty string. This allows native browser validation of `required` fields to work as expected with placeholder options.
Placeholder options bound to null are necessary in forms where the field is conditionally required, and the bound value is posted to an API endpoint which requires it to be a nullable number or object rather than a string.
fixes #8312
---------
Co-authored-by: Ivan Hofer <ivan.hofer@outlook.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Ignatius Bagus <ignatius.mbs@gmail.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
bump to rollup 3. Includes reworking the "treat those imports as external" a bit so that Rollup builds correctly but doesn't bundle some of the (now relative) imports
---------
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
It used the Subscriber type to represent the set callback and the
Unsubscriber to represent the cleanup callback. But the names made
it confusing what it was for.
Implements ResizeObserver bindings: #5524 (comment)
Continuation of: #5963
Related to #7583
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
fixes #6752
---------
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Tan Li Hau <tanhauhau@users.noreply.github.com>
* Localize the examples dependents
* Localize FAQ
* Try to fix examples API
* Remove examples api
* Prerender, use vercel adapter, disable PUT action for now
* Don't call get_examples_data on top
* Move repl PUT to its own routew
* Don't prerender REPL page
* Change console warn
* Prerender tutorial the smart way
* Use getContext in root
* work around some weird content encoding glitch
* Try the pre-generate route
* Apply the suggestions
* Fix embed examples
* Remove comment
* remove commented-out code
* Update sites/svelte.dev/src/routes/_components/Demo.svelte
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
* remove unused code
* add note to self, remove ts-ignore
* move adapter-vercel to devDependencies
* remove some unused deps
* huh we need flexsearch after all? weird
* we need sourcemap-codec as well — what the hell. are these deps missing from a dep?
---------
Co-authored-by: Rich Harris <git@rich-harris.dev>
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
Microdata are a strange set of attributes which are ONLY defined in markup, and have no relationship to the underlying Document Object Model node. As such programmatically defining an element and setting a property on it with a given Microdata attribute will not work:
https://codepen.io/iambrosius/full/jOvXBBG
One can read more about microdata here: https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata
The fix is to remove itemscope being a boolean attribute, because that opts into a transformation as a DOM property, which is wrong.