Skip to content

Commit bf99fd6

Browse files
fix: load images (#174)
from https://via.placeholder.com using crossorigin="anonymous" attribute
1 parent d87ab30 commit bf99fd6

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

content/tutorial/01-svelte/07-lifecycle/01-onmount/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: onMount
33
---
44

5-
> The images in this exercise don't currently work. You can switch to the old tutorial instead: https://svelte.dev/tutorial/onmount
6-
75
Every component has a _lifecycle_ that starts when it is created, and ends when it is destroyed. There are a handful of functions that allow you to run code at key moments during that lifecycle.
86

97
The one you'll use most frequently is `onMount`, which runs after the component is first rendered to the DOM.

content/tutorial/01-svelte/07-lifecycle/01-onmount/app-a/src/lib/App.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
{#each photos as photo}
99
<figure>
1010
<img
11+
crossorigin="anonymous"
1112
src={photo.thumbnailUrl}
1213
alt={photo.title}
1314
/>

content/tutorial/01-svelte/07-lifecycle/01-onmount/app-b/src/lib/App.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
{#each photos as photo}
1818
<figure>
1919
<img
20+
crossorigin="anonymous"
2021
src={photo.thumbnailUrl}
2122
alt={photo.title}
2223
/>

0 commit comments

Comments
 (0)