@muban/muban
Version:
Writing components for server-rendered HTML
14 lines (13 loc) • 598 B
TypeScript
import type { ComponentApi } from '../Component.types';
import type { RefElementType } from '../refs/refDefinitions.types';
export declare function getDirectChildComponents(container: HTMLElement): Array<HTMLElement>;
/**
* Finds the parent data-component element that is not the element itself.
* @param element
*/
export declare function getParentComponentElement(element: RefElementType): HTMLElement | null;
/**
* Finds the parent component instance that "owns" this element
* @param element
*/
export declare function findParentComponent(element: HTMLElement): ComponentApi | undefined;