class ChatBubble extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); const type = this.getAttribute('type') || 'received'; const timestamp = new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); this.shadowRoot.innerHTML = `
${timestamp}
`; } } customElements.define('chat-bubble', ChatBubble);