MCPcopy Index your code
hub / github.com/gridstack/gridstack.js / appendTo

Method appendTo

src/utils.ts:649–659  ·  view source on GitHub ↗
(el: HTMLElement, parent: string | HTMLElement)

Source from the content-addressed store, hash-verified

647 }
648
649 public static appendTo(el: HTMLElement, parent: string | HTMLElement): void {
650 let parentNode: HTMLElement;
651 if (typeof parent === 'string') {
652 parentNode = Utils.getElement(parent);
653 } else {
654 parentNode = parent;
655 }
656 if (parentNode) {
657 parentNode.appendChild(el);
658 }
659 }
660
661 // public static setPositionRelative(el: HTMLElement): void {
662 // if (!(/^(?:r|a|f)/).test(getComputedStyle(el).position)) {

Callers 2

_createHelperMethod · 0.80
utils-spec.tsFile · 0.80

Calls 1

getElementMethod · 0.45

Tested by

no test coverage detected