12 articles tagged #dom on hackpile.dev.
- Your First Client-Side Optimizer
Build a client-side image optimizer: drag-and-drop WebP compression, EXIF-aware decoding, quality slider, and pointer-driven comparison.
- Keeping Your Svelte 5 UI at 60fps During WASM Compression
Move @jsquash to a Web Worker: decode once, re-encode on quality changes. Keep your Svelte 5 UI at 60fps with stateful encoding and transferable objects.
- Lazy Loading, Priority Hints, and the Blur-Up Technique
Master lazy loading, priority hints, and LQIP blur-up techniques to optimize perceived performance and eliminate blank image boxes.
- Stop Sending 4000px Images to a 400px Phone
Responsive delivery ensures the right size reaches the right device. Master srcset, sizes, the picture element, and aspect-ratio for zero-CLS layouts.
- <svelte:head>
Deep dive into Svelte 5's `<svelte:head>` for document head management, SEO, SSR, dynamic meta tags, and patterns for complex apps.
- <svelte:document>
Deep dive into Svelte 5's `<svelte:document>` special element for document-level events, reactive bindings, and attachments.
- <svelte:window>
Deep dive into Svelte 5's <svelte:window> for window events, reactive bindings, SSR-safe usage, and building responsive, window-aware applications.
- <svelte:body>
Deep-dive into Svelte 5's `<svelte:body>` special element for global event handling, keyboard shortcuts, click-outside patterns, and runes-based reactivity.
- Event Handling
Master event handling in Svelte 5 with this guide to event attributes, delegation, callbacks, keyboard and touch events, and real interaction patterns.
- {@attach ...}
Explore the new @attach directive in Svelte 5, its integration with the reactive effect system, and advanced patterns for DOM interaction.