1 |
|
2 |
|
3 |
|
4 | export const doc: Document;
|
5 | export function createElement(name: string): HTMLElement;
|
6 | export function createDocumentFragment(): DocumentFragment;
|
7 | export function createTextNode(text: string): Text;
|
8 | export const domParser: DOMParser;
|
9 | export function emitCustomEvent(el: HTMLElement, name: string, opts: Object): boolean;
|
10 | export function setAttributes(el: Element, attrs: Array<pair.Pair<string, string | boolean>>): Element;
|
11 | export function setAttributesMap(el: Element, attrs: Map<string, string>): Element;
|
12 | export function fragment(children: Array<Node> | HTMLCollection): DocumentFragment;
|
13 | export function append(parent: Element, nodes: Array<Node>): Element;
|
14 | export function remove(el: HTMLElement): void;
|
15 | export function addEventListener(el: EventTarget, name: string, f: EventListener): void;
|
16 | export function removeEventListener(el: EventTarget, name: string, f: EventListener): void;
|
17 | export function addEventListeners(node: Node, listeners: Array<pair.Pair<string, EventListener>>): Node;
|
18 | export function removeEventListeners(node: Node, listeners: Array<pair.Pair<string, EventListener>>): Node;
|
19 | export function element(name: string, attrs?: Array<pair.Pair<string, string> | pair.Pair<string, boolean>>, children?: Array<Node>): Element;
|
20 | export function canvas(width: number, height: number): HTMLCanvasElement;
|
21 | export function text(text: string): Text;
|
22 | export function pairToStyleString(pair: pair.Pair<string, string>): string;
|
23 | export function pairsToStyleString(pairs: Array<pair.Pair<string, string>>): string;
|
24 | export function mapToStyleString(m: Map<string, string>): string;
|
25 | export function querySelector(el: HTMLElement | ShadowRoot, query: string): HTMLElement | null;
|
26 | export function querySelectorAll(el: HTMLElement | ShadowRoot, query: string): NodeListOf<HTMLElement>;
|
27 | export function getElementById(id: string): HTMLElement;
|
28 | export function parseFragment(html: string): DocumentFragment;
|
29 | export function parseElement(html: string): HTMLElement;
|
30 | export function replaceWith(oldEl: HTMLElement, newEl: HTMLElement | DocumentFragment): void;
|
31 | export function insertBefore(parent: HTMLElement, el: HTMLElement, ref: Node | null): HTMLElement;
|
32 | export function appendChild(parent: Node, child: Node): Node;
|
33 | export const ELEMENT_NODE: 1;
|
34 | export const TEXT_NODE: 3;
|
35 | export const CDATA_SECTION_NODE: 4;
|
36 | export const COMMENT_NODE: 8;
|
37 | export const DOCUMENT_NODE: 9;
|
38 | export const DOCUMENT_TYPE_NODE: 10;
|
39 | export const DOCUMENT_FRAGMENT_NODE: 11;
|
40 | export function checkNodeType(node: any, type: number): boolean;
|
41 | export function isParentOf(parent: Node, child: HTMLElement): boolean;
|
42 | import * as pair from './pair.js';
|
43 |
|
\ | No newline at end of file |