coer-elements 2.0.58 → 2.0.59

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.
@@ -753,6 +753,13 @@ class HTMLElements {
753
753
  }
754
754
  }; }
755
755
  /** */
756
+ static { this.GetOffsetTop = (element) => {
757
+ const HTML_ELEMENT = (typeof element === 'string') ? this.GetElement(element) : element;
758
+ return (HTML_ELEMENT)
759
+ ? HTML_ELEMENT.offsetTop
760
+ : 0;
761
+ }; }
762
+ /** */
756
763
  static { this.GetCssValue = (element, style) => {
757
764
  const HTML_ELEMENT = (typeof element === 'string') ? this.GetElement(element) : element;
758
765
  return (HTML_ELEMENT)
@@ -845,6 +852,31 @@ class HTMLElements {
845
852
  }
846
853
  return false;
847
854
  }; }
855
+ /** */
856
+ static { this.HasChildren = (element) => {
857
+ return this.GetChildren(element).length > 0;
858
+ }; }
859
+ /** */
860
+ static { this.GetChildren = (element) => {
861
+ const HTML_ELEMENT = (typeof element === 'string') ? this.GetElement(element) : element;
862
+ return (HTML_ELEMENT)
863
+ ? Array.from(HTML_ELEMENT?.children)
864
+ : [];
865
+ }; }
866
+ /** */
867
+ static { this.GetFather = (element) => {
868
+ const HTML_ELEMENT = (typeof element === 'string') ? this.GetElement(element) : element;
869
+ return (HTML_ELEMENT)
870
+ ? HTML_ELEMENT.parentElement
871
+ : null;
872
+ }; }
873
+ /** */
874
+ static { this.GetGrandfather = (element) => {
875
+ const HTML_ELEMENT = (typeof element === 'string') ? this.GetElement(element) : element;
876
+ return (HTML_ELEMENT)
877
+ ? HTML_ELEMENT.parentElement?.parentElement || null
878
+ : null;
879
+ }; }
848
880
  }
849
881
  ;
850
882