UNPKG

876 BTypeScriptView Raw
1export interface DOMAPI {
2 createElement: (tagName: any) => HTMLElement;
3 createElementNS: (namespaceURI: string, qualifiedName: string) => Element;
4 createTextNode: (text: string) => Text;
5 createComment: (text: string) => Comment;
6 insertBefore: (parentNode: Node, newNode: Node, referenceNode: Node | null) => void;
7 removeChild: (node: Node, child: Node) => void;
8 appendChild: (node: Node, child: Node) => void;
9 parentNode: (node: Node) => Node;
10 nextSibling: (node: Node) => Node;
11 tagName: (elm: Element) => string;
12 setTextContent: (node: Node, text: string | null) => void;
13 getTextContent: (node: Node) => string | null;
14 isElement: (node: Node) => node is Element;
15 isText: (node: Node) => node is Text;
16 isComment: (node: Node) => node is Comment;
17}
18export declare const htmlDomApi: DOMAPI;
19export default htmlDomApi;