constants.js
 1  "use strict";
 2  
 3  module.exports.NAMESPACES = {
 4    HTML: "http://www.w3.org/1999/xhtml",
 5    XML: "http://www.w3.org/XML/1998/namespace",
 6    XMLNS: "http://www.w3.org/2000/xmlns/"
 7  };
 8  
 9  module.exports.NODE_TYPES = {
10    ELEMENT_NODE: 1,
11    ATTRIBUTE_NODE: 2, // historical
12    TEXT_NODE: 3,
13    CDATA_SECTION_NODE: 4,
14    ENTITY_REFERENCE_NODE: 5, // historical
15    ENTITY_NODE: 6, // historical
16    PROCESSING_INSTRUCTION_NODE: 7,
17    COMMENT_NODE: 8,
18    DOCUMENT_NODE: 9,
19    DOCUMENT_TYPE_NODE: 10,
20    DOCUMENT_FRAGMENT_NODE: 11,
21    NOTATION_NODE: 12 // historical
22  };
23  
24  module.exports.VOID_ELEMENTS = new Set([
25    "area",
26    "base",
27    "basefont",
28    "bgsound",
29    "br",
30    "col",
31    "embed",
32    "frame",
33    "hr",
34    "img",
35    "input",
36    "keygen",
37    "link",
38    "menuitem",
39    "meta",
40    "param",
41    "source",
42    "track",
43    "wbr"
44  ]);