7nik
7nik
Maybe it would be better to treat `` as `` when the input doesn't have `group` and `checked` attributes.
But then you end up with a confusing code: ```html ``` And you already can solve this with quite simple and clear `#if`: ```html {#if type==='checkbox'} {:else} {/if} ``` so...
This will mean that neither JS/TS parsers nor JSX parsers will be able to understand `.svelte.js/ts` files, which is not acceptable. In addition, in VSCode, you cannot preprocess `.js/ts` files,...
I've seen people use `this="script"` and `this="style"` when they want to insert a script/style element into the markup.
On discord another [example](https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAA0WOTU7FMAyEr2IsFq2o-NmG9iHOQVi8pq4UkTpR4iChKHdHSdFjZc2M_XkK7tZRQvVRkK8HocL3EHBC-QlNpG9yQjhh8jma5szJRBvkolmLI4ECxmcWWOB-tbxdV0fDCLXpEH1Iw9g298xGrGewbCIdxDKMUFqixe7DXWeMN9RfoqUhFDyfsr6es289tggeFnjpbtU8P_1X43nNIp7Bs3HWfC3l9rj26t1NCkqHvXVaZ5x3F5zw8JvdLW2oJGaqn_UXQht2Vy0BAAA=) was brought up where it's completely unexpected that a prop is frozen. --- > if you pass in `$state.frozen` it won't work aswell, and we can't...
What are your real cases? Why do you want to do something if the data didn't change?
[Simplified REPL](https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAA42Qy26DMBBFf2XkdkEkFPa8pH5Adt2VLggeJLdgI3uIiiz-vTbm0URZ1Btrrs_MXF_LWtGhYemHZbLukaXsbRhYzGgafGFu2BG62qhRN17JTaPFQGUlwR3RD0oTWFDyokZJMEOrVQ_V2lmxO-7dddbDhpyTUJ8PNtAdEvCaaijAzoeEXJDS2Ua9pqCuX47xaBa01UYUnaAotxn-OjkgT3bvlbQv3zj5AeuCfPV2FZKnYRMkjrSJ4xzjMugVF61AzlLSI87xHllo_X9q-LOk8eRPjZKG9jALiLDDHiUt37GBWSYEgz6f7FA10qjlX84fjoa0mlwkDw_HoOz-YY6Peo1nfogv5-IGo8F09VqS25InTi2fZfU5_wIUZ7pHagIAAA==). Edit: [Rune version](https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAA41QzWqEMBB-lZDuQUHWu7pC2ceoPbhmpKGahGQUJOTdmzFbLaWHDojMfD-Tbzwf5QSOV2-eq34GXvFXY3jBcTPUuBUmhNg7vdiBJo0brDTYdorFkrPRFtn9Q06CjVbPrOPXcm-vSdvxTiXuBMhEjz27sYvDHiHzIT8hY7U5obw-kU_YCBBg5QoiIw-CE-EC4wgDZlnObu23fzSOhKY83top_0I28QtJ16Q3P6QS1b66jDRfJkIMPGshRwmCV2gXCMVxn133_wtRAH-Eo3X9Y4r5WKCe5i4704yLGlBqxfr0izyfEKqniw_1ObOAi1U_WVQCHFq9kXxX1SwUJ-N5gvDrRI2QK1scVGl5i9GkKeOw_esi7-ELMl7mTj0CAAA=). Workaround is referencing in the action destroyer a local copy of the editor: ```ts const onMount: Action = (element: Element) => { editor = new...
What about moving the destroying logic to the `onDestroy` and hoisting all the necessary variables to the script level so that they are available in the `onDestroy`?
```html let self = $state() function onclick(e: MouseEvent) { // self can't be undefined here, but the type is HTMLDivElement | undefined self.doSomething() } self.doSomething(); // error - `self` is...
I still don't get benefits of `let {...} = $destructurable(createCounter())` over `let {...} = $derived(createCounter())`. The destructured $derived is, in fact, three-leveled $derived. So, `const { count, increment } =...