We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18d381a commit 56dd795Copy full SHA for 56dd795
1 file changed
html/chat-room/chat-room.html
@@ -175,7 +175,7 @@
175
let nn = 'chat-room-'+key;
176
let ntab = tab.cloneNode(true);
177
ntab.textContent = key;
178
- ntab.onclick = e=>console.log('click',key);
+ ntab.onclick = e=>show(nn);
179
tabs.append(ntab);
180
181
let node = $(host,nn);
@@ -199,7 +199,20 @@
199
}//initdom
200
201
202
- function show(){
+ function show(nn){
203
+
204
+ view.childNodes.forEach(node=>{
205
206
+ if(node.nodeType!==Node.ELEMENT_NODE)return;
207
208
+ var d = 'none';
209
+ if(node.nodeName.toLowerCase()===nn){
210
+ d = '';
211
+ }
212
+ node.style.display = d;
213
214
+ });
215
216
}//show
217
218
0 commit comments