Skip to content

Commit 24ebbcb

Browse files
authored
docs: use e.detail instead of e.details in migration examples (#14340)
1 parent 396ea2e commit 24ebbcb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

documentation/docs/07-misc/07-v5-migration-guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ This function is deprecated in Svelte 5. Instead, components should accept _call
169169
170170
<Pump
171171
---on:---inflate={(power) => {
172-
size += power---.details---;
172+
size += power---.detail---;
173173
if (size > 75) burst = true;
174174
}}
175175
---on:---deflate={(power) => {
176-
if (size > 0) size -= power---.details---;
176+
if (size > 0) size -= power---.detail---;
177177
}}
178178
/>
179179
@@ -317,7 +317,7 @@ When spreading props, local event handlers must go _after_ the spread, or they r
317317
> - import the function
318318
> - call the function to get a dispatch function
319319
> - call said dispatch function with a string and possibly a payload
320-
> - retrieve said payload on the other end through a `.details` property, because the event itself was always a `CustomEvent`
320+
> - retrieve said payload on the other end through a `.detail` property, because the event itself was always a `CustomEvent`
321321
>
322322
> It was always possible to use component callback props, but because you had to listen to DOM events using `on:`, it made sense to use `createEventDispatcher` for component events due to syntactical consistency. Now that we have event attributes (`onclick`), it's the other way around: Callback props are now the more sensible thing to do.
323323
>

0 commit comments

Comments
 (0)