Open
Description
Describe the problem
The documentation suggests that for Svelte versions >= 5.29 @attach
should be used instead of use:
.
When whe call a function using use:
we can reference the own component with this
.
<div use:directive={this, someValue}>content</div>
To have the same result with @attach
, we need to call an anonymous arrow function.
<div {@attach directive((element) => element, someValue)}>content</div>
Describe the proposed solution
Allow to reference the own element by using this
, removing the need to call an arrow function to accomplish that.
<div {@attach directive(this, someValue)}>content</div>
Importance
would make my life easier