Skip to content

Commit 4ae8229

Browse files
authored
docs: add label to snapshot example (#9031)
1 parent fb57f4a commit 4ae8229

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

documentation/docs/30-advanced/65-snapshots.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ To do this, export a `snapshot` object with `capture` and `restore` methods from
2121
</script>
2222
2323
<form method="POST">
24-
<textarea bind:value={comment} />
24+
<label for="comment">Comment</label>
25+
<textarea id="comment" bind:value={comment} />
2526
<button>Post comment</button>
2627
</form>
2728
```
@@ -30,4 +31,4 @@ When you navigate away from this page, the `capture` function is called immediat
3031

3132
The data must be serializable as JSON so that it can be persisted to `sessionStorage`. This allows the state to be restored when the page is reloaded, or when the user navigates back from a different site.
3233

33-
> Avoid returning very large objects from `capture` — once captured, objects will be retained in memory for the duration of the session, and in extreme cases may be too large to persist to `sessionStorage`.
34+
> Avoid returning very large objects from `capture` — once captured, objects will be retained in memory for the duration of the session, and in extreme cases may be too large to persist to `sessionStorage`.

0 commit comments

Comments
 (0)