It is useful to call methods on nested components by making use of refs in event bindings. Whilst this is possible, and works well, Svelte issues a warning when compiling. I would expect Svelte to either not issue a warning, or to not work - right now it does both.
The error is:
'refs.nested.toggleEggs' is an invalid callee (should be one of this.*, event.*, set, fire or destroy)
The ideal resolution for me is to add 'refs.*' as an allowed callee.
Svelte REPL example - open the console to see the warning:
https://svelte.technology/repl?version=1.23.4&gist=b8cd68ce59240062798c647474e1782a
It is useful to call methods on nested components by making use of refs in event bindings. Whilst this is possible, and works well, Svelte issues a warning when compiling. I would expect Svelte to either not issue a warning, or to not work - right now it does both.
The error is:
'refs.nested.toggleEggs' is an invalid callee (should be one of this.*, event.*, set, fire or destroy)The ideal resolution for me is to add 'refs.*' as an allowed callee.
Svelte REPL example - open the console to see the warning:
https://svelte.technology/repl?version=1.23.4&gist=b8cd68ce59240062798c647474e1782a