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
|
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!
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
undefinedornullvalues.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 isundefinedornull(but not spread attributes)spread attributes use
set_attributessvelte/src/runtime/internal/dom.ts
Line 104 in 7de5d6c
for
undefinedandnull(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!