class PairCard extends HTMLElement { constructor() { super(); this.attachShadow({ mode: 'open' }); } connectedCallback() { const pair = this.getAttribute('pair') || 'BTC/USDT'; const image = this.getAttribute('image') || 'http://static.photos/finance/640x360/1'; const description = this.getAttribute('description') || 'Cryptocurrency trading pair'; this.shadowRoot.innerHTML = `

${pair}

${description}

`; } } customElements.define('pair-card', PairCard);