File tree Expand file tree Collapse file tree 1 file changed +27
-7
lines changed
utils/editors/js-console/html/output/v2.0 Expand file tree Collapse file tree 1 file changed +27
-7
lines changed Original file line number Diff line number Diff line change 262262
263263
264264
265- obj . set = function ( node ) {
265+ obj . set = function ( root ) {
266266
267- if ( node ) {
268- cur . root = node ;
267+ if ( root ) {
268+ root = create ( root ) ;
269+ cur . root = root ;
269270 } else {
270271 cur . root = output ;
271272 }
350351
351352 function node ( node ) {
352353
353- if ( typeof node == 'string' ) {
354- var str = node ;
355- node = document . createElement ( str ) ;
356- }
354+ node = create ( node ) ;
357355
358356 cur . root . append ( node ) ;
359357
362360 } //node
363361
364362
363+
364+ //:
365+
366+
367+ function create ( node ) {
368+
369+ var type = datatype ( node ) ;
370+ switch ( type ) {
371+
372+ case 'string' : node = create . string ( node ) ; break ;
373+
374+ } //switch
375+ return node ;
376+
377+ } //create
378+
365379
380+ create . string = function ( str ) {
381+
382+ var node = document . createElement ( str ) ;
383+ return node ;
384+
385+ } //string
366386
367387
368388
You can’t perform that action at this time.
0 commit comments