Skip to content

Commit 2b4f6ba

Browse files
save file
1 parent 2a656a0 commit 2b4f6ba

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

html-components/list/web-console/web-console.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,20 +221,22 @@ <h3>
221221
var par = e.node.parent.title;
222222
var file = e.node.title;
223223
console.log(d,par,file);
224-
var txt;
225224
switch(par){
226225

227-
case 'source' : txt = show.source(file); break;
228-
case 'examples' : txt = show.example(file); break;
226+
case 'source' : show.source(file); break;
227+
case 'examples' : show.example(file); break;
229228

230229
}//switch
231230

231+
}//show
232+
233+
234+
show.display = function(txt){
235+
232236
if(!txt)return;
233-
234237
editor.setvalue(txt);
235238

236-
}//show
237-
239+
}//display
238240

239241
show.source = async function(file){
240242

@@ -250,7 +252,7 @@ <h3>
250252
}
251253

252254
var {txt} = await get(url);
253-
return txt;
255+
show.display(txt);
254256

255257
}//source
256258

@@ -259,7 +261,7 @@ <h3>
259261

260262
var url = 'https://libs.ext-code.com/html/web-console/test/'+file;
261263
var {txt} = await get(url);
262-
return txt;
264+
show.display(txt);
263265

264266
}//example
265267

0 commit comments

Comments
 (0)