File: test.svelte

package info (click to toggle)
web-mode 17.3.20-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,164 kB
  • sloc: lisp: 13,359; javascript: 506; jsp: 113; sh: 10; php: 9; makefile: 8; xml: 2
file content (27 lines) | stat: -rw-r--r-- 469 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<svelte:head>
  <link rel="stylesheet" href="tutorial/dark-theme.css">
</svelte:head>

{#each $items as {id, name}, i}
  <div on:mousemove={handleClick}>
    {id} {"name"}
  </div>
  {@html expression}
  {@debug a, b, c}
{/each}

{#if $something}
  {#if something2}
    Sub Case
  {/if}
{:else}
  Another case
{/if}

{#await promise}
  <p>...waiting</p>
{:then number}
  <p>The number is {number}</p>
{:catch error}
  <p style="color: red">{error.message}</p>
{/await}