@xuda.io/runtime-bundle 1.0.1090 → 1.0.1091

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14743,37 +14743,156 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14743
14743
  },
14744
14744
  };
14745
14745
 
14746
- const draw_html_element = async function (element) {
14747
- let temp_$container = $('<tmp>').data('xuData', $container.data().xuData);
14748
- if (!glb.new_xu_render) {
14749
- temp_$container = $container;
14750
- }
14746
+ const draw_html_element_org = async function (element) {
14751
14747
  const done = async function (ret = {}) {
14752
- if (glb.new_xu_render) {
14753
- const xu_ui_id = $div.attr('xu-ui-id');
14754
- $div.css('display', 'unset');
14755
- if (ret.has_xu_exp_render_attribute) {
14756
- const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($div.data()?.xuData?.attr_exp_info?.['xu-render']?.fields || {}));
14757
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { $div: $div.clone(true), paramsP };
14758
- nodeP.xu_render_xu_ui_id = xu_ui_id;
14759
- nodeP.xu_render_cache_id = xu_render_cache_id;
14760
- if (ret.xu_render_background_processing) {
14761
- $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
14762
- return $div;
14763
- } //else {
14764
- // $container.append(temp_$container.children());
14765
- // return $div;
14748
+ return $div;
14749
+ };
14750
+ if (!element || element === 'script') return await done();
14751
+ let str = '';
14752
+
14753
+ var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
14754
+
14755
+ $div.hover(
14756
+ function (e) {
14757
+ hover_in($div, e);
14758
+ },
14759
+ function (e) {
14760
+ hover_out();
14761
+ },
14762
+ );
14763
+ if (paramsP.paramsP === 'grid' || parent_infoP?.iterate_info) {
14764
+ $div.on('click contextmenu', function (e) {
14765
+ hover_in($div, e);
14766
+ });
14767
+ }
14768
+
14769
+ let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $container, nodeP, $div, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $div, true);
14770
+ if (ret.abort || nodeP.tagName === 'svg' || !_.isEmpty(nodeP?.attributes?.['xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-html']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-html'])) {
14771
+ return await done(ret);
14772
+ }
14773
+ // check if iterator made to prevent children render
14774
+
14775
+ if (nodeP?.attributes?.['xu-viewport'] == 'true') {
14776
+ // const xu_viewport = async function () {
14777
+ // const data = { $div: $div.clone(true), nodeP, parent_infoP, $root_container, paramsP, jobNoP, is_skeleton, keyP, refreshed_ds, parent_nodeP, check_existP, $container };
14778
+ // const container_id = $container.attr('xu-ui-id');
14779
+ // if (!UI_WORKER_OBJ.pending_for_viewport_render[container_id]) {
14780
+ // UI_WORKER_OBJ.pending_for_viewport_render[container_id] = { base_$div: $div, data: [], $container };
14781
+ // await iterate_child($div, nodeP, parent_infoP, $root_container);
14782
+ // } else {
14783
+ // $div.remove();
14784
+ // }
14785
+ // UI_WORKER_OBJ.pending_for_viewport_render[container_id].data.push(data);
14786
+
14787
+ // // if (!$div.children().length) {
14788
+ // // // render the first element to determine height
14789
+ // // await iterate_child($div, nodeP, parent_infoP, $root_container);
14790
+ // // // hover_in($div);
14791
+ // // // func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'render_viewport', data, null, null, paramsP.dsSessionP);
14792
+ // // } else {
14793
+ // // }
14794
+ // };
14795
+ const xu_viewport = function () {
14796
+ const observer_inViewport = new IntersectionObserver(
14797
+ function (entries) {
14798
+ entries.forEach((entry) => {
14799
+ if (entry.isIntersecting) {
14800
+ $(entry.target).trigger('inViewport');
14801
+
14802
+ // Optional: stop observing once triggered
14803
+ observer_inViewport.unobserve(entry.target);
14804
+ }
14805
+ });
14806
+ },
14807
+ {
14808
+ threshold: 0.1, // Trigger when 10% of element is visible
14809
+ },
14810
+ );
14811
+
14812
+ const observer_outViewport = new IntersectionObserver(
14813
+ function (entries) {
14814
+ entries.forEach((entry) => {
14815
+ if (!entry.isIntersecting) {
14816
+ // Element is OUT of viewport - trigger custom event
14817
+ $(entry.target).trigger('outViewport');
14818
+
14819
+ // Optional: stop observing once triggered
14820
+ // observer_outViewport.unobserve(entry.target);
14821
+ }
14822
+ });
14823
+ },
14824
+ {
14825
+ threshold: 0, // Trigger when element is completely out of view
14826
+ },
14827
+ );
14828
+
14829
+ let ui_job_id;
14830
+ $div.on('inViewport', function () {
14831
+ if ($div.children().length) {
14832
+ $div.removeClass('skeleton');
14833
+ return;
14834
+ }
14835
+
14836
+ // if (UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]) {
14837
+ // $div[0].style.removeProperty('height');
14838
+ // $div.removeClass('skeleton');
14839
+ // $div.html(UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]);
14840
+ // } else {
14841
+ hover_in($div);
14842
+ ui_job_id = func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'render_viewport', { $div, nodeP, parent_infoP, $root_container, paramsP, jobNoP, is_skeleton, keyP, refreshed_ds, parent_nodeP, check_existP, temp_$container }, null, null, paramsP.dsSessionP);
14766
14843
  // }
14844
+ observer_outViewport.observe($div[0]);
14845
+ });
14767
14846
 
14768
- return $div;
14769
- } else {
14770
- // $container.append(temp_$container.children());
14771
- if (ret.has_xu_render_attribute) {
14772
- $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
14847
+ $div.on('outViewport', function () {
14848
+ func.UI.worker.delete_job(SESSION_ID, ui_job_id);
14849
+
14850
+ if ($div.children().length) {
14851
+ // UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')] = $div.children().clone(true);
14852
+ $div.empty();
14853
+ const height = $div?.data()?.xuData?.viewport_height || 10;
14854
+ if (typeof height !== 'undefined') {
14855
+ $div.css('height', height);
14856
+ }
14773
14857
  }
14858
+ // $div.addClass('skeleton');
14859
+ observer_inViewport.observe($div[0]);
14860
+ });
14861
+ $div.addClass('skeleton');
14862
+ observer_inViewport.observe($div[0]);
14863
+ };
14864
+ xu_viewport();
14865
+ } else {
14866
+ await iterate_child($div, nodeP, parent_infoP, $root_container);
14867
+ }
14868
+
14869
+ // const ret_iterate_child = await iterate_child($div, nodeP, parent_infoP, null, $root_container);
14870
+ return await done(ret);
14871
+ };
14872
+
14873
+ const draw_html_element = async function (element) {
14874
+ const done = async function (ret = {}) {
14875
+ const xu_ui_id = $div.attr('xu-ui-id');
14876
+ $div.css('display', 'unset');
14877
+ if (ret.has_xu_exp_render_attribute) {
14878
+ const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($div.data()?.xuData?.attr_exp_info?.['xu-render']?.fields || {}));
14879
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { $div: $div.clone(true), paramsP };
14880
+ nodeP.xu_render_xu_ui_id = xu_ui_id;
14881
+ nodeP.xu_render_cache_id = xu_render_cache_id;
14882
+ if (ret.xu_render_background_processing) {
14883
+ $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
14774
14884
  return $div;
14775
- }
14885
+ } //else {
14886
+ // $container.append(temp_$container.children());
14887
+ // return $div;
14888
+ // }
14889
+
14890
+ return $div;
14776
14891
  } else {
14892
+ // $container.append(temp_$container.children());
14893
+ if (ret.has_xu_render_attribute) {
14894
+ $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
14895
+ }
14777
14896
  return $div;
14778
14897
  }
14779
14898
  };
@@ -14782,9 +14901,10 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14782
14901
 
14783
14902
  var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
14784
14903
 
14785
- if (glb.new_xu_render) {
14786
- $div.css('display', 'none');
14787
- }
14904
+ $div.css('display', 'none');
14905
+
14906
+ let temp_$container = $('<tmp>').data('xuData', $container.data().xuData);
14907
+ let temp_$div = $div.clone(true);
14788
14908
 
14789
14909
  $div.hover(
14790
14910
  function (e) {
@@ -14800,7 +14920,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14800
14920
  });
14801
14921
  }
14802
14922
 
14803
- let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $div, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $div, true);
14923
+ let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, temp_$container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, temp_$div, true);
14804
14924
  if (ret.abort || nodeP.tagName === 'svg' || !_.isEmpty(nodeP?.attributes?.['xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-html']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-html'])) {
14805
14925
  return await done(ret);
14806
14926
  }
@@ -14897,13 +15017,9 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14897
15017
  };
14898
15018
  xu_viewport();
14899
15019
  } else {
14900
- if (glb.new_xu_render) {
14901
- if (ret.xu_render_background_processing) {
14902
- // let temp_$div = $div.clone(true);
14903
- iterate_child($div, nodeP, parent_infoP, $root_container);
14904
- } else {
14905
- await iterate_child($div, nodeP, parent_infoP, $root_container);
14906
- }
15020
+ if (ret.xu_render_background_processing) {
15021
+ // let temp_$div = $div.clone(true);
15022
+ iterate_child($div, nodeP, parent_infoP, $root_container);
14907
15023
  } else {
14908
15024
  await iterate_child($div, nodeP, parent_infoP, $root_container);
14909
15025
  }
@@ -14937,7 +15053,11 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14937
15053
  // if (nodeP?.attributes?.['xu-viewport'] == 'true') {
14938
15054
  // return await xu_viewport();
14939
15055
  // } else {
15056
+ if (!glb.new_xu_render) {
15057
+ return await draw_html_element_org(nodeP.tagName);
15058
+ }
14940
15059
  return await draw_html_element(nodeP.tagName);
15060
+
14941
15061
  // }
14942
15062
  };
14943
15063
 
@@ -12468,37 +12468,156 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12468
12468
  },
12469
12469
  };
12470
12470
 
12471
- const draw_html_element = async function (element) {
12472
- let temp_$container = $('<tmp>').data('xuData', $container.data().xuData);
12473
- if (!glb.new_xu_render) {
12474
- temp_$container = $container;
12475
- }
12471
+ const draw_html_element_org = async function (element) {
12476
12472
  const done = async function (ret = {}) {
12477
- if (glb.new_xu_render) {
12478
- const xu_ui_id = $div.attr('xu-ui-id');
12479
- $div.css('display', 'unset');
12480
- if (ret.has_xu_exp_render_attribute) {
12481
- const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($div.data()?.xuData?.attr_exp_info?.['xu-render']?.fields || {}));
12482
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { $div: $div.clone(true), paramsP };
12483
- nodeP.xu_render_xu_ui_id = xu_ui_id;
12484
- nodeP.xu_render_cache_id = xu_render_cache_id;
12485
- if (ret.xu_render_background_processing) {
12486
- $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
12487
- return $div;
12488
- } //else {
12489
- // $container.append(temp_$container.children());
12490
- // return $div;
12473
+ return $div;
12474
+ };
12475
+ if (!element || element === 'script') return await done();
12476
+ let str = '';
12477
+
12478
+ var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
12479
+
12480
+ $div.hover(
12481
+ function (e) {
12482
+ hover_in($div, e);
12483
+ },
12484
+ function (e) {
12485
+ hover_out();
12486
+ },
12487
+ );
12488
+ if (paramsP.paramsP === 'grid' || parent_infoP?.iterate_info) {
12489
+ $div.on('click contextmenu', function (e) {
12490
+ hover_in($div, e);
12491
+ });
12492
+ }
12493
+
12494
+ let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $container, nodeP, $div, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $div, true);
12495
+ if (ret.abort || nodeP.tagName === 'svg' || !_.isEmpty(nodeP?.attributes?.['xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-html']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-html'])) {
12496
+ return await done(ret);
12497
+ }
12498
+ // check if iterator made to prevent children render
12499
+
12500
+ if (nodeP?.attributes?.['xu-viewport'] == 'true') {
12501
+ // const xu_viewport = async function () {
12502
+ // const data = { $div: $div.clone(true), nodeP, parent_infoP, $root_container, paramsP, jobNoP, is_skeleton, keyP, refreshed_ds, parent_nodeP, check_existP, $container };
12503
+ // const container_id = $container.attr('xu-ui-id');
12504
+ // if (!UI_WORKER_OBJ.pending_for_viewport_render[container_id]) {
12505
+ // UI_WORKER_OBJ.pending_for_viewport_render[container_id] = { base_$div: $div, data: [], $container };
12506
+ // await iterate_child($div, nodeP, parent_infoP, $root_container);
12507
+ // } else {
12508
+ // $div.remove();
12509
+ // }
12510
+ // UI_WORKER_OBJ.pending_for_viewport_render[container_id].data.push(data);
12511
+
12512
+ // // if (!$div.children().length) {
12513
+ // // // render the first element to determine height
12514
+ // // await iterate_child($div, nodeP, parent_infoP, $root_container);
12515
+ // // // hover_in($div);
12516
+ // // // func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'render_viewport', data, null, null, paramsP.dsSessionP);
12517
+ // // } else {
12518
+ // // }
12519
+ // };
12520
+ const xu_viewport = function () {
12521
+ const observer_inViewport = new IntersectionObserver(
12522
+ function (entries) {
12523
+ entries.forEach((entry) => {
12524
+ if (entry.isIntersecting) {
12525
+ $(entry.target).trigger('inViewport');
12526
+
12527
+ // Optional: stop observing once triggered
12528
+ observer_inViewport.unobserve(entry.target);
12529
+ }
12530
+ });
12531
+ },
12532
+ {
12533
+ threshold: 0.1, // Trigger when 10% of element is visible
12534
+ },
12535
+ );
12536
+
12537
+ const observer_outViewport = new IntersectionObserver(
12538
+ function (entries) {
12539
+ entries.forEach((entry) => {
12540
+ if (!entry.isIntersecting) {
12541
+ // Element is OUT of viewport - trigger custom event
12542
+ $(entry.target).trigger('outViewport');
12543
+
12544
+ // Optional: stop observing once triggered
12545
+ // observer_outViewport.unobserve(entry.target);
12546
+ }
12547
+ });
12548
+ },
12549
+ {
12550
+ threshold: 0, // Trigger when element is completely out of view
12551
+ },
12552
+ );
12553
+
12554
+ let ui_job_id;
12555
+ $div.on('inViewport', function () {
12556
+ if ($div.children().length) {
12557
+ $div.removeClass('skeleton');
12558
+ return;
12559
+ }
12560
+
12561
+ // if (UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]) {
12562
+ // $div[0].style.removeProperty('height');
12563
+ // $div.removeClass('skeleton');
12564
+ // $div.html(UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]);
12565
+ // } else {
12566
+ hover_in($div);
12567
+ ui_job_id = func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'render_viewport', { $div, nodeP, parent_infoP, $root_container, paramsP, jobNoP, is_skeleton, keyP, refreshed_ds, parent_nodeP, check_existP, temp_$container }, null, null, paramsP.dsSessionP);
12491
12568
  // }
12569
+ observer_outViewport.observe($div[0]);
12570
+ });
12492
12571
 
12493
- return $div;
12494
- } else {
12495
- // $container.append(temp_$container.children());
12496
- if (ret.has_xu_render_attribute) {
12497
- $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
12572
+ $div.on('outViewport', function () {
12573
+ func.UI.worker.delete_job(SESSION_ID, ui_job_id);
12574
+
12575
+ if ($div.children().length) {
12576
+ // UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')] = $div.children().clone(true);
12577
+ $div.empty();
12578
+ const height = $div?.data()?.xuData?.viewport_height || 10;
12579
+ if (typeof height !== 'undefined') {
12580
+ $div.css('height', height);
12581
+ }
12498
12582
  }
12583
+ // $div.addClass('skeleton');
12584
+ observer_inViewport.observe($div[0]);
12585
+ });
12586
+ $div.addClass('skeleton');
12587
+ observer_inViewport.observe($div[0]);
12588
+ };
12589
+ xu_viewport();
12590
+ } else {
12591
+ await iterate_child($div, nodeP, parent_infoP, $root_container);
12592
+ }
12593
+
12594
+ // const ret_iterate_child = await iterate_child($div, nodeP, parent_infoP, null, $root_container);
12595
+ return await done(ret);
12596
+ };
12597
+
12598
+ const draw_html_element = async function (element) {
12599
+ const done = async function (ret = {}) {
12600
+ const xu_ui_id = $div.attr('xu-ui-id');
12601
+ $div.css('display', 'unset');
12602
+ if (ret.has_xu_exp_render_attribute) {
12603
+ const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($div.data()?.xuData?.attr_exp_info?.['xu-render']?.fields || {}));
12604
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { $div: $div.clone(true), paramsP };
12605
+ nodeP.xu_render_xu_ui_id = xu_ui_id;
12606
+ nodeP.xu_render_cache_id = xu_render_cache_id;
12607
+ if (ret.xu_render_background_processing) {
12608
+ $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
12499
12609
  return $div;
12500
- }
12610
+ } //else {
12611
+ // $container.append(temp_$container.children());
12612
+ // return $div;
12613
+ // }
12614
+
12615
+ return $div;
12501
12616
  } else {
12617
+ // $container.append(temp_$container.children());
12618
+ if (ret.has_xu_render_attribute) {
12619
+ $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
12620
+ }
12502
12621
  return $div;
12503
12622
  }
12504
12623
  };
@@ -12507,9 +12626,10 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12507
12626
 
12508
12627
  var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
12509
12628
 
12510
- if (glb.new_xu_render) {
12511
- $div.css('display', 'none');
12512
- }
12629
+ $div.css('display', 'none');
12630
+
12631
+ let temp_$container = $('<tmp>').data('xuData', $container.data().xuData);
12632
+ let temp_$div = $div.clone(true);
12513
12633
 
12514
12634
  $div.hover(
12515
12635
  function (e) {
@@ -12525,7 +12645,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12525
12645
  });
12526
12646
  }
12527
12647
 
12528
- let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $div, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $div, true);
12648
+ let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, temp_$container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, temp_$div, true);
12529
12649
  if (ret.abort || nodeP.tagName === 'svg' || !_.isEmpty(nodeP?.attributes?.['xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-html']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-html'])) {
12530
12650
  return await done(ret);
12531
12651
  }
@@ -12622,13 +12742,9 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12622
12742
  };
12623
12743
  xu_viewport();
12624
12744
  } else {
12625
- if (glb.new_xu_render) {
12626
- if (ret.xu_render_background_processing) {
12627
- // let temp_$div = $div.clone(true);
12628
- iterate_child($div, nodeP, parent_infoP, $root_container);
12629
- } else {
12630
- await iterate_child($div, nodeP, parent_infoP, $root_container);
12631
- }
12745
+ if (ret.xu_render_background_processing) {
12746
+ // let temp_$div = $div.clone(true);
12747
+ iterate_child($div, nodeP, parent_infoP, $root_container);
12632
12748
  } else {
12633
12749
  await iterate_child($div, nodeP, parent_infoP, $root_container);
12634
12750
  }
@@ -12662,7 +12778,11 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12662
12778
  // if (nodeP?.attributes?.['xu-viewport'] == 'true') {
12663
12779
  // return await xu_viewport();
12664
12780
  // } else {
12781
+ if (!glb.new_xu_render) {
12782
+ return await draw_html_element_org(nodeP.tagName);
12783
+ }
12665
12784
  return await draw_html_element(nodeP.tagName);
12785
+
12666
12786
  // }
12667
12787
  };
12668
12788