devsite/node_modules/morphdom/index.d.ts

20 lines
621 B
TypeScript
Raw Normal View History

2024-07-08 01:49:38 +00:00
interface MorphDomOptions {
getNodeKey?: (node: Node) => any;
onBeforeNodeAdded?: (node: Node) => Node;
onNodeAdded?: (node: Node) => Node;
onBeforeElUpdated?: (fromEl: HTMLElement, toEl: HTMLElement) => boolean;
onElUpdated?: (el: HTMLElement) => void;
onBeforeNodeDiscarded?: (node: Node) => boolean;
onNodeDiscarded?: (node: Node) => void;
onBeforeElChildrenUpdated?: (fromEl: HTMLElement, toEl: HTMLElement) => boolean;
childrenOnly?: boolean;
}
declare function morphdom(
fromNode: Node,
toNode: Node | string,
options?: MorphDomOptions,
): void;
export = morphdom;