UNPKG

lazy-js-utils

Version:

A collection of lazy-loaded JavaScript utilities for efficient development

38 lines (35 loc) 1.1 kB
//#region src/webComponent/render.d.ts 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; } //#endregion //#region src/webComponent/crossImageElement.d.ts declare function crossImageElement(name?: string): void; //#endregion //#region src/webComponent/crossVideoElement.d.ts declare function crossVideoElement(name?: string): void; //#endregion export { DomTreeItemInterface, DomTreeType, Render, crossImageElement, crossVideoElement, render };