More Gemini Features Coming to Google TV
Google TV integrates Gemini AI for image/video generation, enhances Google Photos, and adds a dedicated YouTube Shorts feed to the homepage.
Read moreSimilar to Svelte actions, developers can use attachments to execute code when a component or DOM element is mounted or unmounted. Typically, this code sets up listeners for specific events and removes them when the attachment target is unloaded. Attachments can also be integrated with third-party libraries that require access to the target DOM elements. Attachments dependent on reactive values will re-run whenever those values change.
Here's an example using the ScrambleTextPlugin from the GSAP animation library:
<script>
import { gsap } from 'gsap'
import { ScrambleTextPlugin } from 'gsap/ScrambleTextPlugin'
gsap.registerPlugin(ScrambleTextPlugin)
// ⚠️ Attachments reside inside `$effect`
function scramble(text, options) {
return (element) => {
gsap.to(element, {
duration: 2,
scrambleText: text,
...options
})
}
}
let text = $state('Svelte')
</script>
<!-- Tracking context -->
<input type="text" bind:value={text} />
<div {@attach scramble(text)}></div>
When the DOM is initially mounted, the text 'Svelte' will be scrambled. Moreover, any further changes to the text value will also trigger the scrambling effect. Developers can experiment with this example in the Svelte playground.
Therefore, Svelte's attachment functionality extends Svelte actions, which do not provide similar reactivity for their parameters. Additionally, Svelte attachments can be applied to Svelte components, whereas Svelte actions are limited to declarations on DOM elements. This version offers a mechanism to create attachments from actions, allowing developers to reuse existing action libraries.
Attachments can encapsulate behavior separately from markup (similar to practices in other UI frameworks, like hooks in React). Examples of behaviors previously implemented as actions and now benefiting from the attachment feature include clipboard copy, pasting clipboard content into elements, capturing clicks outside an element, masking user input, animating elements, pointer drag-scroll behavior, providing keyboard shortcuts, making elements swipeable, triggering downloads on click, and more.
Google TV integrates Gemini AI for image/video generation, enhances Google Photos, and adds a dedicated YouTube Shorts feed to the homepage.
Read moreAlphabet Q1 paid subscribers reached 350M, fueled by YouTube & Google One. YouTube ad revenue slightly missed at $9.88B amid Premium growth. Total Q1 revenue hit $109.9B, beating forecasts.
Read moreAnthropic releases Claude connectors for Adobe, Blender, and Ableton, enabling AI workflow automation and app control. It also sponsors the Blender Development Foundation.
Read moreApple introduces an App Store model splitting 12-month plans into monthly installments. On iOS 26.4+, it lowers upfront costs without reducing total price, adding billing tracking.
Read moreGoogle launches Aadhaar digital IDs in Wallet for India, enabling secure QR/NFC verification. A phased partner rollout targets key sectors, while passport-based credentials expand globally.
Read moreYouTube tests "Ask YouTube," an AI tool blending text and video for complex queries. Initially for US Premium users, it supports interactive follow-ups, expanding Google's AI search.
Read moreGoogle grants US DoD classified AI access, joining OpenAI and xAI in defense deals amid Anthropic's dispute. Contractual safeguards against surveillance and lethal weapons remain unenforceable.
Read moreMistral AI launches Workflows, a Temporal-powered orchestration platform for secure, Python-driven enterprise AI automation featuring human-in-the-loop approvals.
Read moreCustom subliminal audio maker

AI Social Media Manager

AI Search Visibility

Workout and Calorie Tracker
Stock research platform

AI interview assistant

Scientific figure generator

AI courses with real code