We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d473f2e commit 867c7eaCopy full SHA for 867c7ea
1 file changed
html/chat-room/chat-room.html
@@ -162,26 +162,32 @@
162
163
var shadow = host.shadowRoot;
164
165
- console.log(host.childNodes);
166
-
167
var tabs = $(shadow,'#tabs');
168
tab = $(tabs,'.tab');
169
tab.remove();
170
tab.style.display = '';
171
+ view = $(shadow,'#view');
172
173
var first;
174
for(let key in input){
175
+ ley nn = 'chat-room-'+key;
176
let ntab = tab.cloneNode(true);
177
ntab.textContent = key;
178
- tabs.append(ntab);
179
ntab.onclick = e=>console.log('click',key);
+ tabs.append(ntab);
180
+
181
+ let node = $(host,nn);
182
+ view.append(node);
183
184
if(!first){
185
first = ntab;
186
first.classList.add('active');
187
+ node.style.display = '';
188
}else{
189
ntab.classList.add('inactive');
190
+ node.style.display = 'none';
191
}
192
193
}//for
0 commit comments