diff --git a/site/content/examples/06-lifecycle/02-update/App.svelte b/site/content/examples/06-lifecycle/02-update/App.svelte
index 3eb2dceb52..419e763c57 100644
--- a/site/content/examples/06-lifecycle/02-update/App.svelte
+++ b/site/content/examples/06-lifecycle/02-update/App.svelte
@@ -20,7 +20,7 @@
];
function handleKeydown(event) {
- if (event.which === 13) {
+ if (event.key === 'Enter') {
const text = event.target.value;
if (!text) return;
@@ -103,4 +103,4 @@
-
\ No newline at end of file
+
diff --git a/site/content/examples/06-lifecycle/03-tick/App.svelte b/site/content/examples/06-lifecycle/03-tick/App.svelte
index c9cb6de420..477b5ffb79 100644
--- a/site/content/examples/06-lifecycle/03-tick/App.svelte
+++ b/site/content/examples/06-lifecycle/03-tick/App.svelte
@@ -4,7 +4,7 @@
let text = `Select some text and hit the tab key to toggle uppercase`;
async function handleKeydown(event) {
- if (event.which !== 9) return;
+ if (event.key !== 'Tab') return;
event.preventDefault();
@@ -34,4 +34,4 @@
}
-
\ No newline at end of file
+
diff --git a/site/content/examples/10-animations/00-animate/App.svelte b/site/content/examples/10-animations/00-animate/App.svelte
index 279821491b..a90d0ecfb5 100644
--- a/site/content/examples/10-animations/00-animate/App.svelte
+++ b/site/content/examples/10-animations/00-animate/App.svelte
@@ -112,7 +112,7 @@
diff --git a/site/content/tutorial/07-lifecycle/03-update/app-a/App.svelte b/site/content/tutorial/07-lifecycle/03-update/app-a/App.svelte
index d8c4caabef..a009b2cc1f 100644
--- a/site/content/tutorial/07-lifecycle/03-update/app-a/App.svelte
+++ b/site/content/tutorial/07-lifecycle/03-update/app-a/App.svelte
@@ -20,7 +20,7 @@
];
function handleKeydown(event) {
- if (event.which === 13) {
+ if (event.key === 'Enter') {
const text = event.target.value;
if (!text) return;
@@ -104,4 +104,4 @@
-
\ No newline at end of file
+
diff --git a/site/content/tutorial/07-lifecycle/03-update/app-b/App.svelte b/site/content/tutorial/07-lifecycle/03-update/app-b/App.svelte
index bdf42e28a9..97caca99d5 100644
--- a/site/content/tutorial/07-lifecycle/03-update/app-b/App.svelte
+++ b/site/content/tutorial/07-lifecycle/03-update/app-b/App.svelte
@@ -20,7 +20,7 @@
];
function handleKeydown(event) {
- if (event.which === 13) {
+ if (event.key === 'Enter') {
const text = event.target.value;
if (!text) return;
@@ -104,4 +104,4 @@
-
\ No newline at end of file
+
diff --git a/site/content/tutorial/07-lifecycle/04-tick/app-a/App.svelte b/site/content/tutorial/07-lifecycle/04-tick/app-a/App.svelte
index 3386ff93df..97edefa935 100644
--- a/site/content/tutorial/07-lifecycle/04-tick/app-a/App.svelte
+++ b/site/content/tutorial/07-lifecycle/04-tick/app-a/App.svelte
@@ -2,7 +2,7 @@
let text = `Select some text and hit the tab key to toggle uppercase`;
async function handleKeydown(event) {
- if (event.which !== 9) return;
+ if (event.key !== 'Tab') return;
event.preventDefault();
@@ -32,4 +32,4 @@
}
-
\ No newline at end of file
+
diff --git a/site/content/tutorial/07-lifecycle/04-tick/app-b/App.svelte b/site/content/tutorial/07-lifecycle/04-tick/app-b/App.svelte
index c9cb6de420..477b5ffb79 100644
--- a/site/content/tutorial/07-lifecycle/04-tick/app-b/App.svelte
+++ b/site/content/tutorial/07-lifecycle/04-tick/app-b/App.svelte
@@ -4,7 +4,7 @@
let text = `Select some text and hit the tab key to toggle uppercase`;
async function handleKeydown(event) {
- if (event.which !== 9) return;
+ if (event.key !== 'Tab') return;
event.preventDefault();
@@ -34,4 +34,4 @@
}
-
\ No newline at end of file
+
diff --git a/site/content/tutorial/10-transitions/08-deferred-transitions/app-a/App.svelte b/site/content/tutorial/10-transitions/08-deferred-transitions/app-a/App.svelte
index e869816730..f05c581390 100644
--- a/site/content/tutorial/10-transitions/08-deferred-transitions/app-a/App.svelte
+++ b/site/content/tutorial/10-transitions/08-deferred-transitions/app-a/App.svelte
@@ -56,7 +56,7 @@