You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a legacy of forking from svelte-tag and is no longer necessary since:
Svelte v4 already automatically forwards all attributes to props by default and doesn't offer any API to disable or configure this per se (note that this is different from prop reflection, where changes in prop values are updated back to the attributes in the DOM). Also, with Move to Svelte 4 style custom element API, support prop type coercion #13 there will be no place to put it anyway (at least not for now).
Svelte is able to do this more easily since it's a compiler, so the magic ✨ noted above is still required for us to perform this. Since this is a breaking change, this must be done in v2 and not in v1.
NOTE: See outstanding TODO: ISSUE-36 items.
Describe the proposed solution
Remove attributes from the options array and the associated observedAttributes/attributeChangedCallback methods in favor of the MutationObserver technique utilized in #34.
Alternatives considered
Keep the feature around, but instead find another way to define svelte-retag specific features which do not fit into the Svelte 4 style options syntax being built in #13. While this is feasible, it's not planned so this would be additional related (but separate) work from this particular ticket.
Importance
necessary due to #13 at the moment (see "Alternatives considered" and point 1 at the top).
The text was updated successfully, but these errors were encountered:
Describe the problem
This is a legacy of forking from
svelte-tag
and is no longer necessary since:Proxy
(from Support context from custom element ancestors #10) andMutationObserver
(from Add ability to automatically forward all attributes to props #34) together to dynamically infer the attributes to watch for changes. Theattributes
option only existed out of necessity historically because it simply wasn't possible at the time to automatically know early enough (statically) without breaking things which props existed on the component without requiring the user to tell you what they were. See Add ability to automatically forward all attributes to props #34 for more.Svelte is able to do this more easily since it's a compiler, so the magic ✨ noted above is still required for us to perform this. Since this is a breaking change, this must be done in v2 and not in v1.
NOTE: See outstanding
TODO: ISSUE-36
items.Describe the proposed solution
Remove
attributes
from the options array and the associatedobservedAttributes
/attributeChangedCallback
methods in favor of theMutationObserver
technique utilized in #34.Alternatives considered
Keep the feature around, but instead find another way to define
svelte-retag
specific features which do not fit into the Svelte 4 style options syntax being built in #13. While this is feasible, it's not planned so this would be additional related (but separate) work from this particular ticket.Importance
necessary due to #13 at the moment (see "Alternatives considered" and point 1 at the top).
The text was updated successfully, but these errors were encountered: