Skip to content

Commit 5b63330

Browse files
committed
Merge remote-tracking branch 'sveltejs/main' into update-up-to-20230221
2 parents 0fa3b8f + e9c1730 commit 5b63330

File tree

15 files changed

+82
-61
lines changed

15 files changed

+82
-61
lines changed

content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script>
2+
import { onDestroy } from 'svelte';
3+
24
const emojis = {
35
apple: '🍎',
46
banana: '🍌',
@@ -12,6 +14,11 @@
1214
1315
// ...but the "emoji" variable is fixed upon initialisation of the component
1416
const emoji = emojis[name];
17+
18+
// observe in the console which entry is removed
19+
onDestroy(() => {
20+
console.log('thing destroyed: ' + name);
21+
});
1522
</script>
1623

1724
<p>

content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-b/src/lib/Thing.svelte

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script>
2+
import { onDestroy } from 'svelte';
3+
24
const emojis = {
35
apple: '🍎',
46
banana: '🍌',
@@ -12,6 +14,11 @@
1214
1315
// ...but the "emoji" variable is fixed upon initialisation of the component
1416
const emoji = emojis[name];
17+
18+
// observe in the console which entry is removed
19+
onDestroy(() => {
20+
console.log('thing destroyed: ' + name);
21+
});
1522
</script>
1623

1724
<p>

content/tutorial/01-svelte/01-introduction/06-html-tags/README.md renamed to content/tutorial/03-advanced-svelte/11-special-tags/02-html-tags/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ Svelteでは、`{@html ...}` という特別なタグを使ってこれを行い
1212
<p>{+++@html+++ string}</p>
1313
```
1414

15-
> Svelte は DOM に挿入される前に `{@html ...}` 内の式のサニタイズを行いません。言い換えると、この機能を使用する場合は信頼できないソースから来た HTML を手動でエスケープすることが重要です、そうしなければユーザーを<a href="https://owasp.org/www-community/attacks/xss/" target="_blank">Cross-Site Scripting</a> (XSS) 攻撃にさらす危険性があります。
15+
> **Warning!** Svelte は DOM に挿入される前に `{@html ...}` 内の式のサニタイズを行いません。言い換えると、この機能を使用する場合は信頼できないソースから来た HTML を手動でエスケープすることが重要です、そうしないとユーザーを<a href="https://owasp.org/www-community/attacks/xss/" target="_blank">Cross-Site Scripting</a> (XSS) 攻撃にさらす危険性があります。

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"type": "module",
3535
"dependencies": {
3636
"@fontsource/roboto-mono": "^4.5.10",
37-
"@webcontainer/api": "^0.0.8",
37+
"@webcontainer/api": "^1.0.2",
3838
"adm-zip": "^0.5.10",
3939
"base64-js": "^1.5.1",
4040
"marked": "^4.2.12",

0 commit comments

Comments
 (0)