Concept Flow - svelte:window for window events
Start Component
Add <svelte:window> listener
User triggers window event
Event handler runs
Update component state
Component re-renders
Wait for next event or unmount
The component adds a listener to the window using <svelte:window>. When the user triggers a window event, the handler updates state and the component re-renders.