@spectrumsense/spectrum-chat-dev
Version:
Embeddable AI Widget - Add trusted, evidence-based answers directly to your website. Simple installation, enterprise-grade security.
47 lines (39 loc) • 1.57 kB
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Spectrum Chat Test</title>
</head>
<body>
<h1>Testing Spectrum Chat Widget</h1>
<script src="/dist/spectrum-chat.js"></script>
<spectrum-chat></spectrum-chat>
<script>
console.log('=== DEBUGGING ===');
console.log('1. Script loaded');
setTimeout(() => {
console.log('2. After 1 second:');
console.log(' - spectrum-chat defined?', customElements.get('spectrum-chat'));
const chatElement = document.querySelector('spectrum-chat');
console.log(' - Element found?', !!chatElement);
if (chatElement) {
console.log(' - Has shadowRoot?', !!chatElement.shadowRoot);
if (chatElement.shadowRoot) {
const fab = chatElement.shadowRoot.querySelector('.spectrum-chat-fab');
console.log(' - FAB found?', !!fab);
if (fab) {
console.log('✅ Widget loaded successfully!');
} else {
console.error('❌ FAB not found in shadow root');
}
} else {
console.error('❌ No shadow root');
}
} else {
console.error('❌ spectrum-chat element not found in DOM');
}
}, 1000);
</script>
</body>
</html>