pseudo-dom 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/README.md +686 -241
  2. package/browser/pseudo-dom.js +3576 -735
  3. package/browser/pseudo-dom.min.js +1 -1
  4. package/dist/classes/PseudoEventListener.d.ts +96 -96
  5. package/dist/classes/PseudoEventListener.js +151 -151
  6. package/dist/classes/PseudoHTMLDocument.d.ts +17 -43
  7. package/dist/classes/PseudoHTMLDocument.js +24 -94
  8. package/dist/classes/PseudoHTMLDocument.min.js +1 -1
  9. package/dist/classes/PseudoNodeList.d.ts +34 -34
  10. package/dist/classes/PseudoNodeList.js +71 -71
  11. package/dist/factories/createEvent.d.ts +28 -28
  12. package/dist/factories/createEvent.js +56 -56
  13. package/dist/factories/cssSelectAdapter.d.ts +23 -0
  14. package/dist/factories/cssSelectAdapter.js +87 -0
  15. package/dist/factories/cssSelectAdapter.min.js +1 -0
  16. package/dist/factories/eventDefaults.d.ts +31 -31
  17. package/dist/factories/eventDefaults.js +105 -105
  18. package/dist/factories/generateDocument.d.ts +11 -11
  19. package/dist/factories/generateDocument.js +65 -65
  20. package/dist/factories/generateNodeList.d.ts +9 -9
  21. package/dist/factories/generateNodeList.js +13 -13
  22. package/dist/factories/query.d.ts +33 -0
  23. package/dist/factories/query.js +66 -0
  24. package/dist/factories/query.min.js +1 -0
  25. package/dist/functions/activeElement.d.ts +14 -14
  26. package/dist/functions/activeElement.js +33 -33
  27. package/dist/functions/getElementById.d.ts +13 -0
  28. package/dist/functions/getElementById.js +33 -0
  29. package/dist/functions/getElementById.min.js +1 -0
  30. package/dist/functions/getParentNodes.d.ts +11 -11
  31. package/dist/functions/getParentNodes.js +22 -22
  32. package/dist/functions/getParentNodesFromAttribute.d.ts +14 -14
  33. package/dist/functions/getParentNodesFromAttribute.js +29 -29
  34. package/dist/functions/modifierState.d.ts +29 -29
  35. package/dist/functions/modifierState.js +41 -41
  36. package/dist/interfaces/PseudoAnimation.d.ts +3 -3
  37. package/dist/interfaces/PseudoAnimation.js +5 -5
  38. package/dist/interfaces/PseudoAttr.d.ts +11 -11
  39. package/dist/interfaces/PseudoAttr.js +5 -5
  40. package/dist/interfaces/PseudoDOMTokenList.d.ts +16 -16
  41. package/dist/interfaces/PseudoDOMTokenList.js +5 -5
  42. package/dist/interfaces/PseudoDocument.d.ts +32 -0
  43. package/dist/interfaces/PseudoDocument.js +5 -5
  44. package/dist/interfaces/PseudoDocumentFragment.d.ts +7 -0
  45. package/dist/interfaces/PseudoDocumentFragment.js +5 -5
  46. package/dist/interfaces/PseudoElement.d.ts +702 -689
  47. package/dist/interfaces/PseudoElement.js +5 -5
  48. package/dist/interfaces/PseudoEvent.d.ts +79 -79
  49. package/dist/interfaces/PseudoEvent.js +10 -10
  50. package/dist/interfaces/PseudoEventTarget.d.ts +46 -46
  51. package/dist/interfaces/PseudoEventTarget.js +5 -5
  52. package/dist/interfaces/PseudoHTMLCollection.d.ts +23 -23
  53. package/dist/interfaces/PseudoHTMLCollection.js +5 -5
  54. package/dist/interfaces/PseudoHTMLElement.d.ts +22 -22
  55. package/dist/interfaces/PseudoHTMLElement.js +5 -5
  56. package/dist/interfaces/PseudoHTMLSlotElement.d.ts +3 -3
  57. package/dist/interfaces/PseudoHTMLSlotElement.js +5 -5
  58. package/dist/interfaces/PseudoNamedNodeMap.d.ts +11 -11
  59. package/dist/interfaces/PseudoNamedNodeMap.js +5 -5
  60. package/dist/interfaces/PseudoNode.d.ts +179 -179
  61. package/dist/interfaces/PseudoNode.js +5 -5
  62. package/dist/interfaces/PseudoShadowRoot.d.ts +3 -3
  63. package/dist/interfaces/PseudoShadowRoot.js +5 -5
  64. package/dist/main.d.ts +63 -63
  65. package/dist/main.js +155 -155
  66. package/dist/services/AnimationService.d.ts +4 -4
  67. package/dist/services/AnimationService.js +16 -16
  68. package/dist/services/AttrService.d.ts +37 -37
  69. package/dist/services/AttrService.js +81 -81
  70. package/dist/services/CommentService.d.ts +1 -1
  71. package/dist/services/CommentService.js +13 -13
  72. package/dist/services/CustomEventService.d.ts +37 -37
  73. package/dist/services/CustomEventService.js +35 -35
  74. package/dist/services/DOMTokenListService.d.ts +33 -33
  75. package/dist/services/DOMTokenListService.js +117 -117
  76. package/dist/services/DocumentFragmentService.d.ts +8 -0
  77. package/dist/services/DocumentFragmentService.js +18 -0
  78. package/dist/services/DocumentFragmentService.min.js +1 -1
  79. package/dist/services/DocumentService.d.ts +35 -1
  80. package/dist/services/DocumentService.js +72 -0
  81. package/dist/services/DocumentService.min.js +1 -1
  82. package/dist/services/ElementService.d.ts +191 -178
  83. package/dist/services/ElementService.js +426 -406
  84. package/dist/services/ElementService.min.js +1 -1
  85. package/dist/services/EventService.d.ts +120 -120
  86. package/dist/services/EventService.js +250 -250
  87. package/dist/services/EventTargetService.d.ts +84 -84
  88. package/dist/services/EventTargetService.js +232 -232
  89. package/dist/services/FocusEventService.d.ts +32 -32
  90. package/dist/services/FocusEventService.js +35 -35
  91. package/dist/services/HTMLCollectionService.d.ts +54 -49
  92. package/dist/services/HTMLCollectionService.js +92 -75
  93. package/dist/services/HTMLCollectionService.min.js +1 -1
  94. package/dist/services/HTMLElementService.d.ts +57 -57
  95. package/dist/services/HTMLElementService.js +163 -163
  96. package/dist/services/HTMLSlotElementService.d.ts +4 -4
  97. package/dist/services/HTMLSlotElementService.js +9 -9
  98. package/dist/services/InputEventService.d.ts +41 -41
  99. package/dist/services/InputEventService.js +47 -47
  100. package/dist/services/KeyboardEventService.d.ts +70 -70
  101. package/dist/services/KeyboardEventService.js +86 -86
  102. package/dist/services/MouseEventService.d.ts +80 -80
  103. package/dist/services/MouseEventService.js +108 -108
  104. package/dist/services/NamedNodeMapService.d.ts +23 -23
  105. package/dist/services/NamedNodeMapService.js +77 -77
  106. package/dist/services/NodeService.d.ts +297 -271
  107. package/dist/services/NodeService.js +721 -679
  108. package/dist/services/NodeService.min.js +1 -1
  109. package/dist/services/PointerEventService.d.ts +51 -51
  110. package/dist/services/PointerEventService.js +67 -67
  111. package/dist/services/ShadowRootService.d.ts +4 -4
  112. package/dist/services/ShadowRootService.js +9 -9
  113. package/dist/services/TextService.d.ts +1 -1
  114. package/dist/services/TextService.js +13 -13
  115. package/dist/services/UIEventService.d.ts +43 -43
  116. package/dist/services/UIEventService.js +42 -42
  117. package/dist/simulate.d.ts +32 -32
  118. package/dist/simulate.js +115 -115
  119. package/package.json +4 -3
  120. package/dist/classes.d.ts +0 -20
  121. package/dist/classes.js +0 -31
  122. package/dist/classes.min.js +0 -1
  123. package/dist/factories/generateNode.d.ts +0 -32
  124. package/dist/factories/generateNode.js +0 -85
  125. package/dist/factories/generateNode.min.js +0 -1
  126. package/dist/factories.d.ts +0 -11
  127. package/dist/factories.js +0 -27
  128. package/dist/factories.min.js +0 -1
  129. package/dist/functions.d.ts +0 -5
  130. package/dist/functions.js +0 -23
  131. package/dist/functions.min.js +0 -1
@@ -1,49 +1,54 @@
1
- /**
2
- * @file Substitute for the DOM HTMLCollection Class.
3
- * @author Joshua Heagle <joshuaheagle@gmail.com>
4
- * @version 1.0.0
5
- */
6
- import { NodeService } from './NodeService';
7
- import { PseudoHTMLCollection } from '../interfaces/PseudoHTMLCollection';
8
- /**
9
- * Simulate the behaviour of the HTMLCollection Class when there is no DOM available: a live view of the element
10
- * children of a node, recomputed from its childNodes each time it is used rather than kept in sync as they change.
11
- * @author Joshua Heagle <joshuaheagle@gmail.com>
12
- * @class
13
- */
14
- export declare class HTMLCollectionService implements PseudoHTMLCollection {
15
- private readonly owner;
16
- /**
17
- * @param {NodeService} owner The node whose element children this is a live view of
18
- * @constructor
19
- */
20
- constructor(owner: NodeService);
21
- /**
22
- * The current element children of the owner, in order.
23
- * @returns {Array<PseudoNode>}
24
- */
25
- private elements;
26
- /**
27
- * How many elements are in the collection right now.
28
- * @returns {number}
29
- */
30
- get length(): number;
31
- /**
32
- * The element at the given index, or null when there is none.
33
- * @param {number} index
34
- * @returns {*}
35
- */
36
- item(index: number): any | null;
37
- /**
38
- * The element whose id, or (failing that) whose name attribute, is the given value, or null when there is none.
39
- * @param {string} name
40
- * @returns {*}
41
- */
42
- namedItem(name: string): any | null;
43
- /**
44
- * Iterate over the current element children.
45
- * @returns {Iterator}
46
- */
47
- [Symbol.iterator](): Iterator<any>;
48
- }
49
- export default HTMLCollectionService;
1
+ /**
2
+ * @file Substitute for the DOM HTMLCollection Class.
3
+ * @author Joshua Heagle <joshuaheagle@gmail.com>
4
+ * @version 1.0.0
5
+ */
6
+ import { NodeService } from './NodeService';
7
+ import { PseudoHTMLCollection } from '../interfaces/PseudoHTMLCollection';
8
+ /**
9
+ * Simulate the behaviour of the HTMLCollection Class when there is no DOM available: a live view of some of a node's
10
+ * element descendants, recomputed each time it is used rather than kept in sync as they change.
11
+ * @author Joshua Heagle <joshuaheagle@gmail.com>
12
+ * @class
13
+ */
14
+ export declare class HTMLCollectionService implements PseudoHTMLCollection {
15
+ private readonly owner;
16
+ private readonly predicate;
17
+ private readonly deep;
18
+ /**
19
+ * @param {NodeService} owner The node this is a live view of a part of
20
+ * @param {function(*): boolean} [predicate] Only elements which pass this are included (every element by default)
21
+ * @param {boolean} [deep=false] Include every matching descendant (true, like getElementsByTagName), not just the
22
+ * direct element children (false, like Element.children)
23
+ * @constructor
24
+ */
25
+ constructor(owner: NodeService, predicate?: (element: any) => boolean, deep?: boolean);
26
+ /**
27
+ * The current elements the collection holds, in tree order.
28
+ * @returns {Array<PseudoNode>}
29
+ */
30
+ private elements;
31
+ /**
32
+ * How many elements are in the collection right now.
33
+ * @returns {number}
34
+ */
35
+ get length(): number;
36
+ /**
37
+ * The element at the given index, or null when there is none.
38
+ * @param {number} index
39
+ * @returns {*}
40
+ */
41
+ item(index: number): any | null;
42
+ /**
43
+ * The element whose id, or (failing that) whose name attribute, is the given value, or null when there is none.
44
+ * @param {string} name
45
+ * @returns {*}
46
+ */
47
+ namedItem(name: string): any | null;
48
+ /**
49
+ * Iterate over the current elements.
50
+ * @returns {Iterator}
51
+ */
52
+ [Symbol.iterator](): Iterator<any>;
53
+ }
54
+ export default HTMLCollectionService;
@@ -1,75 +1,92 @@
1
- 'use strict'
2
-
3
- require('core-js/modules/esnext.iterator.constructor.js')
4
- require('core-js/modules/esnext.iterator.filter.js')
5
- require('core-js/modules/esnext.iterator.find.js')
6
- Object.defineProperty(exports, '__esModule', {
7
- value: true
8
- })
9
- exports.HTMLCollectionService = void 0
10
- /**
11
- * @file Substitute for the DOM HTMLCollection Class.
12
- * @author Joshua Heagle <joshuaheagle@gmail.com>
13
- * @version 1.0.0
14
- */
15
- const NodeService_1 = require('./NodeService')
16
- /**
17
- * Simulate the behaviour of the HTMLCollection Class when there is no DOM available: a live view of the element
18
- * children of a node, recomputed from its childNodes each time it is used rather than kept in sync as they change.
19
- * @author Joshua Heagle <joshuaheagle@gmail.com>
20
- * @class
21
- */
22
- class HTMLCollectionService {
23
- /**
24
- * @param {NodeService} owner The node whose element children this is a live view of
25
- * @constructor
26
- */
27
- constructor (owner) {
28
- this.owner = owner
29
- }
30
-
31
- /**
32
- * The current element children of the owner, in order.
33
- * @returns {Array<PseudoNode>}
34
- */
35
- elements () {
36
- return Array.from(this.owner.childNodes).filter(node => node.nodeType === NodeService_1.NodeService.ELEMENT_NODE)
37
- }
38
-
39
- /**
40
- * How many elements are in the collection right now.
41
- * @returns {number}
42
- */
43
- get length () {
44
- return this.elements().length
45
- }
46
-
47
- /**
48
- * The element at the given index, or null when there is none.
49
- * @param {number} index
50
- * @returns {*}
51
- */
52
- item (index) {
53
- return this.elements()[index] || null
54
- }
55
-
56
- /**
57
- * The element whose id, or (failing that) whose name attribute, is the given value, or null when there is none.
58
- * @param {string} name
59
- * @returns {*}
60
- */
61
- namedItem (name) {
62
- const elements = this.elements()
63
- return elements.find(element => element.id === name) || elements.find(element => element.getAttribute('name') === name) || null
64
- }
65
-
66
- /**
67
- * Iterate over the current element children.
68
- * @returns {Iterator}
69
- */
70
- [Symbol.iterator] () {
71
- return this.elements()[Symbol.iterator]()
72
- }
73
- }
74
- exports.HTMLCollectionService = HTMLCollectionService
75
- exports.default = HTMLCollectionService
1
+ 'use strict'
2
+
3
+ require('core-js/modules/esnext.iterator.constructor.js')
4
+ require('core-js/modules/esnext.iterator.find.js')
5
+ require('core-js/modules/esnext.iterator.for-each.js')
6
+ Object.defineProperty(exports, '__esModule', {
7
+ value: true
8
+ })
9
+ exports.HTMLCollectionService = void 0
10
+ /**
11
+ * @file Substitute for the DOM HTMLCollection Class.
12
+ * @author Joshua Heagle <joshuaheagle@gmail.com>
13
+ * @version 1.0.0
14
+ */
15
+ const NodeService_1 = require('./NodeService')
16
+ /**
17
+ * Simulate the behaviour of the HTMLCollection Class when there is no DOM available: a live view of some of a node's
18
+ * element descendants, recomputed each time it is used rather than kept in sync as they change.
19
+ * @author Joshua Heagle <joshuaheagle@gmail.com>
20
+ * @class
21
+ */
22
+ class HTMLCollectionService {
23
+ /**
24
+ * @param {NodeService} owner The node this is a live view of a part of
25
+ * @param {function(*): boolean} [predicate] Only elements which pass this are included (every element by default)
26
+ * @param {boolean} [deep=false] Include every matching descendant (true, like getElementsByTagName), not just the
27
+ * direct element children (false, like Element.children)
28
+ * @constructor
29
+ */
30
+ constructor (owner, predicate = () => true, deep = false) {
31
+ this.owner = owner
32
+ this.predicate = predicate
33
+ this.deep = deep
34
+ }
35
+
36
+ /**
37
+ * The current elements the collection holds, in tree order.
38
+ * @returns {Array<PseudoNode>}
39
+ */
40
+ elements () {
41
+ const results = []
42
+ const visit = node => {
43
+ Array.from(node.childNodes).forEach(child => {
44
+ if (child.nodeType === NodeService_1.NodeService.ELEMENT_NODE && this.predicate(child)) {
45
+ results.push(child)
46
+ }
47
+ if (this.deep && child.nodeType === NodeService_1.NodeService.ELEMENT_NODE) {
48
+ visit(child)
49
+ }
50
+ })
51
+ }
52
+ visit(this.owner)
53
+ return results
54
+ }
55
+
56
+ /**
57
+ * How many elements are in the collection right now.
58
+ * @returns {number}
59
+ */
60
+ get length () {
61
+ return this.elements().length
62
+ }
63
+
64
+ /**
65
+ * The element at the given index, or null when there is none.
66
+ * @param {number} index
67
+ * @returns {*}
68
+ */
69
+ item (index) {
70
+ return this.elements()[index] || null
71
+ }
72
+
73
+ /**
74
+ * The element whose id, or (failing that) whose name attribute, is the given value, or null when there is none.
75
+ * @param {string} name
76
+ * @returns {*}
77
+ */
78
+ namedItem (name) {
79
+ const elements = this.elements()
80
+ return elements.find(element => element.id === name) || elements.find(element => element.getAttribute('name') === name) || null
81
+ }
82
+
83
+ /**
84
+ * Iterate over the current elements.
85
+ * @returns {Iterator}
86
+ */
87
+ [Symbol.iterator] () {
88
+ return this.elements()[Symbol.iterator]()
89
+ }
90
+ }
91
+ exports.HTMLCollectionService = HTMLCollectionService
92
+ exports.default = HTMLCollectionService
@@ -1 +1 @@
1
- "use strict";require("core-js/modules/esnext.iterator.constructor.js"),require("core-js/modules/esnext.iterator.filter.js"),require("core-js/modules/esnext.iterator.find.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.HTMLCollectionService=void 0;const NodeService_1=require("./NodeService");class HTMLCollectionService{constructor(e){this.owner=e}elements(){return Array.from(this.owner.childNodes).filter(e=>e.nodeType===NodeService_1.NodeService.ELEMENT_NODE)}get length(){return this.elements().length}item(e){return this.elements()[e]||null}namedItem(e){const t=this.elements();return t.find(t=>t.id===e)||t.find(t=>t.getAttribute("name")===e)||null}[Symbol.iterator](){return this.elements()[Symbol.iterator]()}}exports.HTMLCollectionService=HTMLCollectionService,exports.default=HTMLCollectionService;
1
+ "use strict";require("core-js/modules/esnext.iterator.constructor.js"),require("core-js/modules/esnext.iterator.find.js"),require("core-js/modules/esnext.iterator.for-each.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.HTMLCollectionService=void 0;const NodeService_1=require("./NodeService");class HTMLCollectionService{constructor(e,t=()=>!0,r=!1){this.owner=e,this.predicate=t,this.deep=r}elements(){const e=[],t=r=>{Array.from(r.childNodes).forEach(r=>{r.nodeType===NodeService_1.NodeService.ELEMENT_NODE&&this.predicate(r)&&e.push(r),this.deep&&r.nodeType===NodeService_1.NodeService.ELEMENT_NODE&&t(r)})};return t(this.owner),e}get length(){return this.elements().length}item(e){return this.elements()[e]||null}namedItem(e){const t=this.elements();return t.find(t=>t.id===e)||t.find(t=>t.getAttribute("name")===e)||null}[Symbol.iterator](){return this.elements()[Symbol.iterator]()}}exports.HTMLCollectionService=HTMLCollectionService,exports.default=HTMLCollectionService;
@@ -1,57 +1,57 @@
1
- /**
2
- * @file Substitute for the DOM HTMLElement Class.
3
- * @author Joshua Heagle <joshuaheagle@gmail.com>
4
- * @version 1.0.0
5
- */
6
- import { PseudoHTMLElement } from '../interfaces/PseudoHTMLElement';
7
- import { PseudoNode } from '../interfaces/PseudoNode';
8
- import { ElementService } from './ElementService';
9
- /**
10
- * Simulate the behaviour of the HTMLElement Class when there is no DOM available.
11
- * @author Joshua Heagle <joshuaheagle@gmail.com>
12
- * @class
13
- * @augments PseudoElement
14
- * @property {boolean} hidden - State of whether element is visible
15
- * @property {number} offsetHeight - The height of the element as offset by the parent element
16
- * @property {number} offsetLeft - The position of the left side of the element based on the parent element
17
- * @property {PseudoHTMLElement} offsetParent - A reference to the closest positioned parent element
18
- * @property {number} offsetTop - The position of the top side of the element based on the parent element
19
- * @property {number} offsetWidth - The width of the element as offset by the parent element
20
- * @property {Object} style - A container to define all applied inline-styles
21
- * @property {string} title - The title attribute which affects the text visible on hover
22
- */
23
- export declare class HTMLElementService extends ElementService implements Partial<PseudoHTMLElement> {
24
- /**
25
- * Simulate the HTMLElement object when the Dom is not available
26
- * @param {Object} [elementOptions={}]
27
- * @param {string} [elementOptions.tagName='']
28
- * @param {PseudoNode|Object} [elementOptions.parent={}]
29
- * @param {Array} [elementOptions.children=[]]
30
- * @constructor
31
- */
32
- constructor({ tagName, parent, children }?: {
33
- tagName?: string;
34
- parent?: PseudoNode | null;
35
- children?: Array<any>;
36
- });
37
- /**
38
- * Whether this element can have the focus: form controls and links which are not disabled, and anything with a tabindex.
39
- * @returns {boolean}
40
- */
41
- get canFocus(): boolean;
42
- /**
43
- * Click the element: a click event is sent to it, which bubbles and can be cancelled, like one from a user but a
44
- * script made it (so it is not trusted). A disabled element does nothing.
45
- */
46
- click(): void;
47
- /**
48
- * Give the element the focus. The element which had it gets blur then focusout, and this one gets focus then
49
- * focusin (blur and focus do not bubble, focusin and focusout do). Nothing happens when the element cannot have the
50
- * focus or already has it.
51
- */
52
- focus(): void;
53
- /**
54
- * Take the focus away from the element, when it has it: it gets blur then focusout.
55
- */
56
- blur(): void;
57
- }
1
+ /**
2
+ * @file Substitute for the DOM HTMLElement Class.
3
+ * @author Joshua Heagle <joshuaheagle@gmail.com>
4
+ * @version 1.0.0
5
+ */
6
+ import { PseudoHTMLElement } from '../interfaces/PseudoHTMLElement';
7
+ import { PseudoNode } from '../interfaces/PseudoNode';
8
+ import { ElementService } from './ElementService';
9
+ /**
10
+ * Simulate the behaviour of the HTMLElement Class when there is no DOM available.
11
+ * @author Joshua Heagle <joshuaheagle@gmail.com>
12
+ * @class
13
+ * @augments PseudoElement
14
+ * @property {boolean} hidden - State of whether element is visible
15
+ * @property {number} offsetHeight - The height of the element as offset by the parent element
16
+ * @property {number} offsetLeft - The position of the left side of the element based on the parent element
17
+ * @property {PseudoHTMLElement} offsetParent - A reference to the closest positioned parent element
18
+ * @property {number} offsetTop - The position of the top side of the element based on the parent element
19
+ * @property {number} offsetWidth - The width of the element as offset by the parent element
20
+ * @property {Object} style - A container to define all applied inline-styles
21
+ * @property {string} title - The title attribute which affects the text visible on hover
22
+ */
23
+ export declare class HTMLElementService extends ElementService implements Partial<PseudoHTMLElement> {
24
+ /**
25
+ * Simulate the HTMLElement object when the Dom is not available
26
+ * @param {Object} [elementOptions={}]
27
+ * @param {string} [elementOptions.tagName='']
28
+ * @param {PseudoNode|Object} [elementOptions.parent={}]
29
+ * @param {Array} [elementOptions.children=[]]
30
+ * @constructor
31
+ */
32
+ constructor({ tagName, parent, children }?: {
33
+ tagName?: string;
34
+ parent?: PseudoNode | null;
35
+ children?: Array<any>;
36
+ });
37
+ /**
38
+ * Whether this element can have the focus: form controls and links which are not disabled, and anything with a tabindex.
39
+ * @returns {boolean}
40
+ */
41
+ get canFocus(): boolean;
42
+ /**
43
+ * Click the element: a click event is sent to it, which bubbles and can be cancelled, like one from a user but a
44
+ * script made it (so it is not trusted). A disabled element does nothing.
45
+ */
46
+ click(): void;
47
+ /**
48
+ * Give the element the focus. The element which had it gets blur then focusout, and this one gets focus then
49
+ * focusin (blur and focus do not bubble, focusin and focusout do). Nothing happens when the element cannot have the
50
+ * focus or already has it.
51
+ */
52
+ focus(): void;
53
+ /**
54
+ * Take the focus away from the element, when it has it: it gets blur then focusout.
55
+ */
56
+ blur(): void;
57
+ }