1 | /** Types of elements found in htmlparser2's DOM */
|
2 | export declare enum ElementType {
|
3 | /** Type for the root element of a document */
|
4 | Root = "root",
|
5 | /** Type for Text */
|
6 | Text = "text",
|
7 | /** Type for <? ... ?> */
|
8 | Directive = "directive",
|
9 | /** Type for <!-- ... --> */
|
10 | Comment = "comment",
|
11 | /** Type for <script> tags */
|
12 | Script = "script",
|
13 | /** Type for <style> tags */
|
14 | Style = "style",
|
15 | /** Type for Any tag */
|
16 | Tag = "tag",
|
17 | /** Type for <![CDATA[ ... ]]> */
|
18 | CDATA = "cdata",
|
19 | /** Type for <!doctype ...> */
|
20 | Doctype = "doctype"
|
21 | }
|
22 | /**
|
23 | * Tests whether an element is a tag or not.
|
24 | *
|
25 | * @param elem Element to test
|
26 | */
|
27 | export declare function isTag(elem: {
|
28 | type: ElementType;
|
29 | }): boolean;
|
30 | /** Type for the root element of a document */
|
31 | export declare const Root = ElementType.Root;
|
32 | /** Type for Text */
|
33 | export declare const Text = ElementType.Text;
|
34 | /** Type for <? ... ?> */
|
35 | export declare const Directive = ElementType.Directive;
|
36 | /** Type for <!-- ... --> */
|
37 | export declare const Comment = ElementType.Comment;
|
38 | /** Type for <script> tags */
|
39 | export declare const Script = ElementType.Script;
|
40 | /** Type for <style> tags */
|
41 | export declare const Style = ElementType.Style;
|
42 | /** Type for Any tag */
|
43 | export declare const Tag = ElementType.Tag;
|
44 | /** Type for <![CDATA[ ... ]]> */
|
45 | export declare const CDATA = ElementType.CDATA;
|
46 | /** Type for <!doctype ...> */
|
47 | export declare const Doctype = ElementType.Doctype;
|
48 | //# sourceMappingURL=index.d.ts.map |
\ | No newline at end of file |