for loop not running in javascript
i have a problem with my svelte code. on the line 41 i have a for loop, which doesn't run anything, as it doesn't print out the i variable on the 42 line. here is my code: <script> import Toolbar…
i have a problem with my svelte code. on the line 41 i have a for loop, which doesn't run anything, as it doesn't print out the i variable on the 42 line. here is my code: <script> import Toolbar…
I have a svelte project that uses Vite for its build tooling. I want to import a js file from the sakura-js package and call it in my index.html file. It works locally when I use the script tag like…
I'm currently using SvelteKit for the frontend of my web application, and while it's been a great framework overall, I've encountered a challenge related to the timing of the onMount lifecycle hook. Specifically, it seems to fire after the prerendering…
I'm using a sveltekit app for the frontend, and a python backend. I'm using the admin sdk to perform server-side validation and storing the cookies, using that each time I make a request to my backend. The problem is that…
I'm trying to create a reusable function that uses data from the current URL to generate some output. However, when I do the following: // reusableScript.js import { page } from '$app/stores'; export default () => { return page.url }…
I'm making an app where the window is translucent using SvelteKit + Tauri. I've tried setting the transparent to true in tauri.conf.json and the container element has a 0.92 opacity in css. // tauri.conf.json "windows": [ { "fullscreen": false, "height":…
So I have a footer component that reads links from a JSON file. I have a particular header that I only want to have present if the corresponding JSON property is not blank (i.e., if there's no link provided, it…
I'm trying to type an event that I receive from a Svelte-managed input element, but TypeScript tells me that my JSDoc type is incompatible with what I receive from the on:input. In my page code I have an input field…
I recently started to look into Svelte and wanted to create a component called SelectorTable which allows me to select the rows of table by clicking on them. A selected row is supposed to get highlighted in a different color.…
Let's say we have a Button Component that takes props variant: 'primary'|'secondary' <Button variant='primary' on:click={()=>console.log('hello')}> click </Button> I want to create a PrimaryButton Component that has all props and actions from Button Component but override the props with default values.…