link = createRawSnippet((href, content) => ({ render: () => `<a href="${href()}">${content()}</a>`, setup: (a) => { // ↓自分でもろもろ登録する必要がある $effect(() => a.href = href()); $effect(() => a.textContent = content()); a.addEventListener('focus', console.log); return () => a.removeEventListener('focus', console.log); }, }));