UNPKG

lazy-js-utils

Version:

A collection of lazy-loaded JavaScript utilities for efficient development

33 lines (29 loc) 937 B
interface DomTreeItemInterface { tag: string; class?: string; name?: string; children?: DomTreeType | string; } type DomTreeType = readonly DomTreeItemInterface[]; declare function render(arr: DomTreeType | DomTreeItemInterface, node: ShadowRoot | HTMLElement): void; declare class Render extends HTMLElement { props: Record<string, string>; /** * 创建影子节点 * https://developer.mozilla.org/zh-CN/docs/Web/API/Element/attachShadow */ shadowRoot: ShadowRoot; constructor(); initial(): void; /** * 初始化影子节点 */ setupShadow(): void; renderCss(): void; setProps(): void; css(): string; html(): DomTreeType; } declare function crossImageElement(name?: string): void; declare function crossVideoElement(name?: string): void; export { type DomTreeItemInterface, type DomTreeType, Render, crossImageElement, crossVideoElement, render };