forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdom4.d.ts
57 lines (46 loc) · 1.49 KB
/
dom4.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Type definitions for dom4 v1.5
// Project: https://github.com/WebReflection/dom4
// Definitions by: Adi Dahiya <https://github.com/adidahiya>, Gilad Gray <https://github.com/giladgray>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface ParentNode {
/**
* Returns the child elements.
*/
children: HTMLCollection;
/**
* Returns the first child that is an element, and null otherwise.
*/
firstElementChild: Element;
/**
* Returns the last child that is an element, and null otherwise.
*/
lastElementChild: Element;
/**
* Returns the number of children that are elements.
*/
childElementCount: number;
/**
* Returns the first element that is a descendant of node that matches relativeSelectors.
*/
query(relativeSelectors: string): Element;
/**
* Returns all element descendants of node that match relativeSelectors.
*/
queryAll(relativeSelectors: string): Elements;
}
interface Element extends ParentNode {
/**
* Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.
*/
closest(selectors: string): Element;
/**
* Returns true if matching selectors against element’s root yields element, and false otherwise.
*/
matches(selectors: string): boolean;
}
interface Elements extends ParentNode, Array<Element> {
}
interface Document extends ParentNode {
}
interface DocumentFragment extends ParentNode {
}