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 @@
e.which === 13 && add(e.target)} + on:keydown={e => e.key === 'Enter' && add(e.target)} >
@@ -145,4 +145,4 @@ label:hover button { opacity: 1; } - \ No newline at end of file + diff --git a/site/content/tutorial/10-transitions/08-deferred-transitions/app-b/App.svelte b/site/content/tutorial/10-transitions/08-deferred-transitions/app-b/App.svelte index 3cb21a8ed9..b7447ca7de 100644 --- a/site/content/tutorial/10-transitions/08-deferred-transitions/app-b/App.svelte +++ b/site/content/tutorial/10-transitions/08-deferred-transitions/app-b/App.svelte @@ -56,7 +56,7 @@
e.which === 13 && add(e.target)} + on:keydown={e => e.key === 'Enter' && add(e.target)} >
@@ -152,4 +152,4 @@ label:hover button { opacity: 1; } - \ No newline at end of file + diff --git a/site/content/tutorial/11-animations/01-animate/app-a/App.svelte b/site/content/tutorial/11-animations/01-animate/app-a/App.svelte index 3cb21a8ed9..b7447ca7de 100644 --- a/site/content/tutorial/11-animations/01-animate/app-a/App.svelte +++ b/site/content/tutorial/11-animations/01-animate/app-a/App.svelte @@ -56,7 +56,7 @@
e.which === 13 && add(e.target)} + on:keydown={e => e.key === 'Enter' && add(e.target)} >
@@ -152,4 +152,4 @@ label:hover button { opacity: 1; } - \ No newline at end of file + diff --git a/site/content/tutorial/11-animations/01-animate/app-b/App.svelte b/site/content/tutorial/11-animations/01-animate/app-b/App.svelte index 6194dd941e..0d232bf02b 100644 --- a/site/content/tutorial/11-animations/01-animate/app-b/App.svelte +++ b/site/content/tutorial/11-animations/01-animate/app-b/App.svelte @@ -57,7 +57,7 @@
e.which === 13 && add(e.target)} + on:keydown={e => e.key === 'Enter' && add(e.target)} >
@@ -155,4 +155,4 @@ label:hover button { opacity: 1; } - \ No newline at end of file +