-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Describe the bug
This bug is already described in a few places, #3067, #1434, #3235, I added comment at the end of #1434
Expected behavior
In special, spread attributes to be deleted on undefined or null values.
In general, spread attributes to behave similar to not spread (at runtime).
Severity
Low to medium.
Additional context
Some attributes are deleted with node.removeAttribute() when the value is undefined or null (but not spread attributes)
spread attributes use set_attributes
svelte/src/runtime/internal/dom.ts
Line 104 in 7de5d6c
| node[key] = attributes[key]; |
for
undefined and null
(worst case <input { ...{ size: undefined} } >)
Before #3346 data attributes has to use dataset (but not spread attributes).
Maybe some other rules are not used for spread attr?
Thank you!