File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
html-components/list/web-console Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff 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
250252 }
251253
252254 var { txt} = await get ( url ) ;
253- return txt ;
255+ show . display ( txt ) ;
254256
255257 } //source
256258
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
You can’t perform that action at this time.
0 commit comments