pseudo-dom 0.17.0 → 1.0.1

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 (99) hide show
  1. package/README.md +63 -5869
  2. package/browser/pseudo-dom.js +304 -688
  3. package/browser/pseudo-dom.min.js +1 -1
  4. package/dist/classes/PseudoEventListener.d.ts +11 -37
  5. package/dist/classes/PseudoEventListener.js +11 -37
  6. package/dist/classes/PseudoHTMLDocument.d.ts +4 -12
  7. package/dist/classes/PseudoHTMLDocument.js +1 -11
  8. package/dist/classes/PseudoNodeList.d.ts +1 -9
  9. package/dist/classes/PseudoNodeList.js +1 -9
  10. package/dist/factories/createDataset.d.ts +1 -3
  11. package/dist/factories/createDataset.js +3 -8
  12. package/dist/factories/createEvent.d.ts +5 -9
  13. package/dist/factories/createEvent.js +3 -5
  14. package/dist/factories/createStyleDeclaration.d.ts +4 -10
  15. package/dist/factories/createStyleDeclaration.js +4 -10
  16. package/dist/factories/cssSelectAdapter.d.ts +0 -2
  17. package/dist/factories/cssSelectAdapter.js +3 -8
  18. package/dist/factories/eventDefaults.d.ts +5 -9
  19. package/dist/factories/eventDefaults.js +1 -4
  20. package/dist/factories/generateDocument.d.ts +2 -4
  21. package/dist/factories/generateDocument.js +86 -82
  22. package/dist/factories/generateDocument.min.js +1 -1
  23. package/dist/factories/generateNodeList.d.ts +1 -2
  24. package/dist/factories/generateNodeList.js +1 -2
  25. package/dist/factories/installGlobal.d.ts +2 -3
  26. package/dist/factories/installGlobal.js +3 -6
  27. package/dist/factories/logElement.d.ts +2 -4
  28. package/dist/factories/logElement.js +3 -7
  29. package/dist/factories/parseHTML.d.ts +3 -5
  30. package/dist/factories/parseHTML.js +4 -8
  31. package/dist/factories/query.d.ts +8 -16
  32. package/dist/factories/query.js +9 -19
  33. package/dist/factories/serializeHTML.d.ts +4 -10
  34. package/dist/factories/serializeHTML.js +12 -25
  35. package/dist/functions/activeElement.d.ts +3 -6
  36. package/dist/functions/activeElement.js +3 -6
  37. package/dist/functions/getElementById.d.ts +2 -4
  38. package/dist/functions/getElementById.js +2 -4
  39. package/dist/functions/getParentNodes.d.ts +1 -3
  40. package/dist/functions/getParentNodes.js +1 -3
  41. package/dist/functions/getParentNodesFromAttribute.d.ts +3 -5
  42. package/dist/functions/getParentNodesFromAttribute.js +3 -5
  43. package/dist/functions/modifierState.d.ts +3 -12
  44. package/dist/functions/modifierState.js +3 -7
  45. package/dist/interfaces/PseudoCSSStyleDeclaration.d.ts +1 -1
  46. package/dist/interfaces/PseudoDocument.d.ts +4 -9
  47. package/dist/interfaces/PseudoDocumentFragment.d.ts +1 -2
  48. package/dist/interfaces/PseudoElement.d.ts +39 -78
  49. package/dist/interfaces/PseudoEvent.d.ts +11 -43
  50. package/dist/interfaces/PseudoEvent.js +1 -3
  51. package/dist/interfaces/PseudoEventTarget.d.ts +7 -16
  52. package/dist/interfaces/PseudoHTMLCollection.d.ts +2 -4
  53. package/dist/interfaces/PseudoHTMLElement.d.ts +8 -13
  54. package/dist/interfaces/PseudoNode.d.ts +3 -13
  55. package/dist/main.d.ts +1 -6
  56. package/dist/main.js +1 -6
  57. package/dist/services/AttrService.d.ts +5 -9
  58. package/dist/services/AttrService.js +5 -9
  59. package/dist/services/CSSStyleDeclarationService.d.ts +10 -23
  60. package/dist/services/CSSStyleDeclarationService.js +10 -23
  61. package/dist/services/CustomEventService.d.ts +4 -15
  62. package/dist/services/CustomEventService.js +3 -10
  63. package/dist/services/DOMTokenListService.d.ts +2 -5
  64. package/dist/services/DOMTokenListService.js +2 -5
  65. package/dist/services/DocumentFragmentService.d.ts +1 -5
  66. package/dist/services/DocumentFragmentService.js +1 -5
  67. package/dist/services/DocumentService.d.ts +4 -12
  68. package/dist/services/DocumentService.js +4 -12
  69. package/dist/services/ElementService.d.ts +62 -120
  70. package/dist/services/ElementService.js +61 -117
  71. package/dist/services/EventService.d.ts +6 -44
  72. package/dist/services/EventService.js +18 -44
  73. package/dist/services/EventTargetService.d.ts +16 -28
  74. package/dist/services/EventTargetService.js +16 -28
  75. package/dist/services/FocusEventService.d.ts +4 -12
  76. package/dist/services/FocusEventService.js +3 -10
  77. package/dist/services/HTMLCollectionService.d.ts +6 -16
  78. package/dist/services/HTMLCollectionService.js +6 -16
  79. package/dist/services/HTMLElementService.d.ts +132 -154
  80. package/dist/services/HTMLElementService.js +333 -353
  81. package/dist/services/InputEventService.d.ts +5 -16
  82. package/dist/services/InputEventService.js +3 -12
  83. package/dist/services/KeyboardEventService.d.ts +8 -26
  84. package/dist/services/KeyboardEventService.js +4 -16
  85. package/dist/services/MouseEventService.d.ts +7 -30
  86. package/dist/services/MouseEventService.js +4 -18
  87. package/dist/services/NamedNodeMapService.d.ts +1 -4
  88. package/dist/services/NamedNodeMapService.js +1 -4
  89. package/dist/services/NodeService.d.ts +38 -69
  90. package/dist/services/NodeService.js +39 -72
  91. package/dist/services/PointerEventService.d.ts +4 -22
  92. package/dist/services/PointerEventService.js +3 -15
  93. package/dist/services/ShadowRootService.d.ts +0 -3
  94. package/dist/services/ShadowRootService.js +0 -3
  95. package/dist/services/UIEventService.d.ts +5 -17
  96. package/dist/services/UIEventService.js +3 -11
  97. package/dist/simulate.d.ts +7 -9
  98. package/dist/simulate.js +9 -15
  99. package/package.json +8 -7
@@ -1,22 +1,17 @@
1
1
  /**
2
- * @file Substitute for the DOM HTMLElement Class.
3
- * @author Joshua Heagle <joshuaheagle@gmail.com>
4
- * @version 1.0.0
2
+ * Substitute for the DOM HTMLElement Class.
5
3
  */
6
4
  import { PseudoElement } from './PseudoElement';
7
5
  import { PseudoCSSStyleDeclaration } from './PseudoCSSStyleDeclaration';
8
6
  /**
9
7
  * Simulate the behaviour of the HTMLElement Class when there is no DOM available.
10
- * @author Joshua Heagle <joshuaheagle@gmail.com>
11
- * @class
12
- * @augments PseudoElement
13
- * @property {boolean} hidden - State of whether element is visible
14
- * @property {number} offsetHeight - The height of the element as offset by the parent element
15
- * @property {number} offsetLeft - The position of the left side of the element based on the parent element
16
- * @property {PseudoHTMLElement} offsetParent - A reference to the closest positioned parent element
17
- * @property {number} offsetTop - The position of the top side of the element based on the parent element
18
- * @property {number} offsetWidth - The width of the element as offset by the parent element
19
- * @property {string} title - The title attribute which affects the text visible on hover
8
+ *
9
+ * It also has these simple properties, which are stored as attributes:
10
+ * - `hidden`: state of whether the element is visible
11
+ * - `title`: the title attribute, which affects the text visible on hover
12
+ * - `offsetHeight`, `offsetWidth`: the height and width of the element as offset by the parent element
13
+ * - `offsetLeft`, `offsetTop`: the position of the left and top sides of the element based on the parent element
14
+ * - `offsetParent`: a reference to the closest positioned parent element
20
15
  */
21
16
  export interface PseudoHTMLElement extends PseudoElement {
22
17
  /**
@@ -1,7 +1,5 @@
1
1
  /**
2
- * @file Substitute for the DOM Node Class.
3
- * @author Joshua Heagle <joshuaheagle@gmail.com>
4
- * @version 1.0.0
2
+ * Substitute for the DOM Node Class.
5
3
  */
6
4
  import { PseudoEventTarget } from './PseudoEventTarget';
7
5
  import { PseudoNodeList } from '../classes/PseudoNodeList';
@@ -11,12 +9,6 @@ import { PseudoElement } from './PseudoElement';
11
9
  import { PseudoDocumentFragment } from './PseudoDocumentFragment';
12
10
  /**
13
11
  * Simulate the behaviour of the Node Class when there is no DOM available.
14
- * @author Joshua Heagle <joshuaheagle@gmail.com>
15
- * @class
16
- * @augments PseudoEventTarget
17
- * @property {string} name
18
- * @property {function} appendChild
19
- * @property {function} removeChild
20
12
  */
21
13
  export interface PseudoNode extends PseudoEventTarget {
22
14
  /**
@@ -99,8 +91,7 @@ export interface PseudoNode extends PseudoEventTarget {
99
91
  set textContent(text: string | null);
100
92
  /**
101
93
  * Adds the specified childNode argument as the last child to the current node. If the argument referenced an existing node on the DOM tree, the node will be detached from its current position and attached at the new position.
102
- * @param {PseudoNode} childNode
103
- * @returns {PseudoNode}
94
+ * @param childNode
104
95
  */
105
96
  appendChild(childNode: PseudoNode): PseudoNode;
106
97
  /**
@@ -166,8 +157,7 @@ export interface PseudoNode extends PseudoEventTarget {
166
157
  normalize(): void;
167
158
  /**
168
159
  * Removes a child node from the current element, which must be a child of the current node.
169
- * @param {PseudoNode} child
170
- * @returns {PseudoNode}
160
+ * @param child
171
161
  */
172
162
  removeChild(child: PseudoNode): PseudoNode;
173
163
  /**
package/dist/main.d.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  /**
2
- * @file All of the Pseudo Dom Helper Objects functions for simulating parts of the DOM when running scripts in NodeJs.
3
- * @author Joshua Heagle <joshuaheagle@gmail.com>
4
- * @version 1.0.0
2
+ * All of the Pseudo Dom Helper Objects functions for simulating parts of the DOM when running scripts in NodeJs.
5
3
  */
6
4
  import { EventService as PseudoEvent } from './services/EventService';
7
5
  import PseudoEventTarget from './services/EventTargetService';
@@ -26,9 +24,6 @@ import simulate from './simulate';
26
24
  import { TextService as PseudoText, CommentService as PseudoComment } from './services/NodeService';
27
25
  /**
28
26
  * All methods exported from this module are encapsulated within pseudoDom.
29
- * @author Joshua Heagle <joshuaheagle@gmail.com>
30
- * @typedef {Object} pseudoDom
31
- * @module pseudoDom/objects
32
27
  */
33
28
  declare const pseudoDom: {
34
29
  generateDocument: (root: Window | any, context?: object) => Window | PseudoEventTarget;
package/dist/main.js CHANGED
@@ -1,9 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  /**
4
- * @file All of the Pseudo Dom Helper Objects functions for simulating parts of the DOM when running scripts in NodeJs.
5
- * @author Joshua Heagle <joshuaheagle@gmail.com>
6
- * @version 1.0.0
4
+ * All of the Pseudo Dom Helper Objects functions for simulating parts of the DOM when running scripts in NodeJs.
7
5
  */
8
6
  const __importDefault = void 0 && (void 0).__importDefault || function (mod) {
9
7
  return mod && mod.__esModule
@@ -131,9 +129,6 @@ Object.defineProperty(exports, 'PseudoComment', {
131
129
  })
132
130
  /**
133
131
  * All methods exported from this module are encapsulated within pseudoDom.
134
- * @author Joshua Heagle <joshuaheagle@gmail.com>
135
- * @typedef {Object} pseudoDom
136
- * @module pseudoDom/objects
137
132
  */
138
133
  const pseudoDom = {
139
134
  generateDocument: generateDocument_1.default,
@@ -3,9 +3,6 @@ import { PseudoElement } from '../interfaces/PseudoElement';
3
3
  import { NodeService } from './NodeService';
4
4
  /**
5
5
  * Simulate the behaviour of the Attr Class when there is no DOM available.
6
- * @author Joshua Heagle <joshuaheagle@gmail.com>
7
- * @class
8
- * @augments NodeService
9
6
  */
10
7
  export declare class AttrService extends NodeService implements PseudoAttr {
11
8
  value: string;
@@ -14,12 +11,11 @@ export declare class AttrService extends NodeService implements PseudoAttr {
14
11
  private readonly namespace;
15
12
  private readonly namespacePrefix;
16
13
  /**
17
- * @param {string} name The name of the attribute
18
- * @param {string} [value=''] The value of the attribute
19
- * @param {PseudoElement|null} [ownerElement=null] The element which has this attribute
20
- * @param {string} [namespaceURI=''] The namespace of the attribute
21
- * @param {string|null} [prefix=null] The namespace prefix of the attribute
22
- * @constructor
14
+ * @param name The name of the attribute
15
+ * @param value The value of the attribute
16
+ * @param ownerElement The element which has this attribute
17
+ * @param namespaceURI The namespace of the attribute
18
+ * @param prefix The namespace prefix of the attribute
23
19
  */
24
20
  constructor(name?: string, value?: string, ownerElement?: PseudoElement | null, namespaceURI?: string, prefix?: string | null);
25
21
  protected get acceptsChildren(): boolean;
@@ -7,18 +7,14 @@ exports.AttrService = void 0
7
7
  const NodeService_1 = require('./NodeService')
8
8
  /**
9
9
  * Simulate the behaviour of the Attr Class when there is no DOM available.
10
- * @author Joshua Heagle <joshuaheagle@gmail.com>
11
- * @class
12
- * @augments NodeService
13
10
  */
14
11
  class AttrService extends NodeService_1.NodeService {
15
12
  /**
16
- * @param {string} name The name of the attribute
17
- * @param {string} [value=''] The value of the attribute
18
- * @param {PseudoElement|null} [ownerElement=null] The element which has this attribute
19
- * @param {string} [namespaceURI=''] The namespace of the attribute
20
- * @param {string|null} [prefix=null] The namespace prefix of the attribute
21
- * @constructor
13
+ * @param name The name of the attribute
14
+ * @param value The value of the attribute
15
+ * @param ownerElement The element which has this attribute
16
+ * @param namespaceURI The namespace of the attribute
17
+ * @param prefix The namespace prefix of the attribute
22
18
  */
23
19
  constructor (name = '', value = '', ownerElement = null, namespaceURI = '', prefix = null) {
24
20
  super()
@@ -1,7 +1,5 @@
1
1
  /**
2
- * @file Substitute for the DOM CSSStyleDeclaration Class (the object behind Element.style).
3
- * @author Joshua Heagle <joshuaheagle@gmail.com>
4
- * @version 1.0.0
2
+ * Substitute for the DOM CSSStyleDeclaration Class (the object behind Element.style).
5
3
  */
6
4
  /**
7
5
  * Simulate the behaviour of the CSSStyleDeclaration Class when there is no DOM available: an ordered map of CSS
@@ -9,64 +7,53 @@
9
7
  * given, with no unit conversion, shorthand expansion or validation - this is a data structure, not a real CSS
10
8
  * engine. Named property access (declaration.backgroundColor, camelCase) is added on top of this by
11
9
  * createStyleDeclaration, which wraps an instance of this class in a Proxy.
12
- * @author Joshua Heagle <joshuaheagle@gmail.com>
13
- * @class
14
10
  */
15
11
  export declare class CSSStyleDeclarationService {
16
12
  private readonly properties;
17
13
  /**
18
- * @param {string} [cssText=''] Initial declarations, as CSS text ("color: red; font-size: 12px;")
19
- * @constructor
14
+ * @param cssText Initial declarations, as CSS text ("color: red; font-size: 12px;")
20
15
  */
21
16
  constructor(cssText?: string);
22
17
  /**
23
18
  * How many properties are currently set.
24
- * @returns {number}
25
19
  */
26
20
  get length(): number;
27
21
  /**
28
22
  * The name of the property at the given index, in the order it was set, or '' when there is none (matches the
29
23
  * DOM's CSSStyleDeclaration, which is array-like).
30
- * @param {number} index
31
- * @returns {string}
24
+ * @param index
32
25
  */
33
26
  item(index: number): string;
34
27
  /**
35
28
  * The value of the given property, or '' when it is not set.
36
- * @param {string} property A CSS property name (kebab-case, e.g. "background-color")
37
- * @returns {string}
29
+ * @param property A CSS property name (kebab-case, e.g. "background-color")
38
30
  */
39
31
  getPropertyValue(property: string): string;
40
32
  /**
41
33
  * "important" when the property was set with !important, otherwise ''.
42
- * @param {string} property A CSS property name (kebab-case)
43
- * @returns {string}
34
+ * @param property A CSS property name (kebab-case)
44
35
  */
45
36
  getPropertyPriority(property: string): string;
46
37
  /**
47
38
  * Set a property's value (and optionally its priority). An empty, null or undefined value removes the property
48
39
  * instead, like the DOM.
49
- * @param {string} property A CSS property name (kebab-case)
50
- * @param {string} value The value, or '' to remove the property
51
- * @param {string} [priority=''] "important" to mark it !important
52
- * @returns {undefined}
40
+ * @param property A CSS property name (kebab-case)
41
+ * @param value The value, or '' to remove the property
42
+ * @param priority "important" to mark it !important
53
43
  */
54
44
  setProperty(property: string, value: string, priority?: string): void;
55
45
  /**
56
46
  * Remove a property, returning the value it had (or '' when it was not set).
57
- * @param {string} property A CSS property name (kebab-case)
58
- * @returns {string}
47
+ * @param property A CSS property name (kebab-case)
59
48
  */
60
49
  removeProperty(property: string): string;
61
50
  /**
62
51
  * All the declarations as one CSS text string.
63
- * @returns {string}
64
52
  */
65
53
  get cssText(): string;
66
54
  /**
67
55
  * Replace every declaration by parsing a CSS text string ("color: red; font-size: 12px !important;").
68
- * @param {string} cssText
69
- * @returns {undefined}
56
+ * @param cssText
70
57
  */
71
58
  set cssText(cssText: string);
72
59
  }
@@ -1,9 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  /**
4
- * @file Substitute for the DOM CSSStyleDeclaration Class (the object behind Element.style).
5
- * @author Joshua Heagle <joshuaheagle@gmail.com>
6
- * @version 1.0.0
4
+ * Substitute for the DOM CSSStyleDeclaration Class (the object behind Element.style).
7
5
  */
8
6
  require('core-js/modules/esnext.iterator.constructor.js')
9
7
  require('core-js/modules/esnext.iterator.for-each.js')
@@ -31,13 +29,10 @@ exports.CSSStyleDeclarationService = void 0
31
29
  * given, with no unit conversion, shorthand expansion or validation - this is a data structure, not a real CSS
32
30
  * engine. Named property access (declaration.backgroundColor, camelCase) is added on top of this by
33
31
  * createStyleDeclaration, which wraps an instance of this class in a Proxy.
34
- * @author Joshua Heagle <joshuaheagle@gmail.com>
35
- * @class
36
32
  */
37
33
  class CSSStyleDeclarationService {
38
34
  /**
39
- * @param {string} [cssText=''] Initial declarations, as CSS text ("color: red; font-size: 12px;")
40
- * @constructor
35
+ * @param cssText Initial declarations, as CSS text ("color: red; font-size: 12px;")
41
36
  */
42
37
  constructor (cssText = '') {
43
38
  this.properties = new Map()
@@ -46,7 +41,6 @@ class CSSStyleDeclarationService {
46
41
 
47
42
  /**
48
43
  * How many properties are currently set.
49
- * @returns {number}
50
44
  */
51
45
  get length () {
52
46
  return this.properties.size
@@ -55,8 +49,7 @@ class CSSStyleDeclarationService {
55
49
  /**
56
50
  * The name of the property at the given index, in the order it was set, or '' when there is none (matches the
57
51
  * DOM's CSSStyleDeclaration, which is array-like).
58
- * @param {number} index
59
- * @returns {string}
52
+ * @param index
60
53
  */
61
54
  item (index) {
62
55
  return Array.from(this.properties.keys())[index] || ''
@@ -64,8 +57,7 @@ class CSSStyleDeclarationService {
64
57
 
65
58
  /**
66
59
  * The value of the given property, or '' when it is not set.
67
- * @param {string} property A CSS property name (kebab-case, e.g. "background-color")
68
- * @returns {string}
60
+ * @param property A CSS property name (kebab-case, e.g. "background-color")
69
61
  */
70
62
  getPropertyValue (property) {
71
63
  const entry = this.properties.get(property)
@@ -74,8 +66,7 @@ class CSSStyleDeclarationService {
74
66
 
75
67
  /**
76
68
  * "important" when the property was set with !important, otherwise ''.
77
- * @param {string} property A CSS property name (kebab-case)
78
- * @returns {string}
69
+ * @param property A CSS property name (kebab-case)
79
70
  */
80
71
  getPropertyPriority (property) {
81
72
  const entry = this.properties.get(property)
@@ -85,10 +76,9 @@ class CSSStyleDeclarationService {
85
76
  /**
86
77
  * Set a property's value (and optionally its priority). An empty, null or undefined value removes the property
87
78
  * instead, like the DOM.
88
- * @param {string} property A CSS property name (kebab-case)
89
- * @param {string} value The value, or '' to remove the property
90
- * @param {string} [priority=''] "important" to mark it !important
91
- * @returns {undefined}
79
+ * @param property A CSS property name (kebab-case)
80
+ * @param value The value, or '' to remove the property
81
+ * @param priority "important" to mark it !important
92
82
  */
93
83
  setProperty (property, value, priority = '') {
94
84
  if (value === '' || value === null || typeof value === 'undefined') {
@@ -103,8 +93,7 @@ class CSSStyleDeclarationService {
103
93
 
104
94
  /**
105
95
  * Remove a property, returning the value it had (or '' when it was not set).
106
- * @param {string} property A CSS property name (kebab-case)
107
- * @returns {string}
96
+ * @param property A CSS property name (kebab-case)
108
97
  */
109
98
  removeProperty (property) {
110
99
  const value = this.getPropertyValue(property)
@@ -114,7 +103,6 @@ class CSSStyleDeclarationService {
114
103
 
115
104
  /**
116
105
  * All the declarations as one CSS text string.
117
- * @returns {string}
118
106
  */
119
107
  get cssText () {
120
108
  return Array.from(this.properties.entries()).map(([property, {
@@ -125,8 +113,7 @@ class CSSStyleDeclarationService {
125
113
 
126
114
  /**
127
115
  * Replace every declaration by parsing a CSS text string ("color: red; font-size: 12px !important;").
128
- * @param {string} cssText
129
- * @returns {undefined}
116
+ * @param cssText
130
117
  */
131
118
  set cssText (cssText) {
132
119
  this.properties.clear()
@@ -1,36 +1,25 @@
1
1
  /**
2
- * @file Substitute for the DOM CustomEvent Class.
3
- * @author Joshua Heagle <joshuaheagle@gmail.com>
4
- * @version 1.0.0
2
+ * Substitute for the DOM CustomEvent Class.
5
3
  */
6
4
  import { EventService } from './EventService';
7
5
  /**
8
6
  * The options for creating a custom event.
9
- * @typedef {Object} CustomEventInit
10
- * @property {boolean} [bubbles=false]
11
- * @property {boolean} [cancelable=false]
12
- * @property {boolean} [composed=false]
13
- * @property {*} [detail=null] Whatever data the event should carry
14
7
  */
15
8
  export type CustomEventInit = {
16
9
  bubbles?: boolean;
17
10
  cancelable?: boolean;
18
11
  composed?: boolean;
12
+ /** Whatever data the event should carry (default null) */
19
13
  detail?: any;
20
14
  };
21
15
  /**
22
16
  * Simulate the behaviour of the CustomEvent Class when there is no DOM available: an event which carries data.
23
- * @author Joshua Heagle <joshuaheagle@gmail.com>
24
- * @class
25
- * @augments EventService
26
- * @property {*} detail
27
17
  */
28
18
  export declare class CustomEventService extends EventService {
29
19
  private readonly eventDetail;
30
20
  /**
31
- * @param {string} [typeArg=''] The type of the event
32
- * @param {CustomEventInit} [init={}] The options for the event
33
- * @constructor
21
+ * @param typeArg The type of the event
22
+ * @param init The options for the event
34
23
  */
35
24
  constructor(typeArg?: string, init?: CustomEventInit);
36
25
  get detail(): any;
@@ -5,23 +5,16 @@ Object.defineProperty(exports, '__esModule', {
5
5
  })
6
6
  exports.CustomEventService = void 0
7
7
  /**
8
- * @file Substitute for the DOM CustomEvent Class.
9
- * @author Joshua Heagle <joshuaheagle@gmail.com>
10
- * @version 1.0.0
8
+ * Substitute for the DOM CustomEvent Class.
11
9
  */
12
10
  const EventService_1 = require('./EventService')
13
11
  /**
14
12
  * Simulate the behaviour of the CustomEvent Class when there is no DOM available: an event which carries data.
15
- * @author Joshua Heagle <joshuaheagle@gmail.com>
16
- * @class
17
- * @augments EventService
18
- * @property {*} detail
19
13
  */
20
14
  class CustomEventService extends EventService_1.EventService {
21
15
  /**
22
- * @param {string} [typeArg=''] The type of the event
23
- * @param {CustomEventInit} [init={}] The options for the event
24
- * @constructor
16
+ * @param typeArg The type of the event
17
+ * @param init The options for the event
25
18
  */
26
19
  constructor (typeArg = '', init = {}) {
27
20
  super(typeArg, init)
@@ -1,16 +1,13 @@
1
1
  import { PseudoDOMTokenList } from '../interfaces/PseudoDOMTokenList';
2
2
  /**
3
3
  * Simulate the behaviour of the DOMTokenList Class when there is no DOM available.
4
- * @author Joshua Heagle <joshuaheagle@gmail.com>
5
- * @class
6
4
  */
7
5
  export declare class DOMTokenListService implements PseudoDOMTokenList {
8
6
  private tokens;
9
7
  private readonly onChange;
10
8
  /**
11
- * @param {string} [value=''] The space separated tokens to start with
12
- * @param {function(string): void} [onChange] Called with the new value whenever the tokens change
13
- * @constructor
9
+ * @param value The space separated tokens to start with
10
+ * @param onChange Called with the new value whenever the tokens change
14
11
  */
15
12
  constructor(value?: string, onChange?: (value: string) => void);
16
13
  private static parse;
@@ -10,14 +10,11 @@ Object.defineProperty(exports, '__esModule', {
10
10
  exports.DOMTokenListService = void 0
11
11
  /**
12
12
  * Simulate the behaviour of the DOMTokenList Class when there is no DOM available.
13
- * @author Joshua Heagle <joshuaheagle@gmail.com>
14
- * @class
15
13
  */
16
14
  class DOMTokenListService {
17
15
  /**
18
- * @param {string} [value=''] The space separated tokens to start with
19
- * @param {function(string): void} [onChange] Called with the new value whenever the tokens change
20
- * @constructor
16
+ * @param value The space separated tokens to start with
17
+ * @param onChange Called with the new value whenever the tokens change
21
18
  */
22
19
  constructor (value = '', onChange = () => undefined) {
23
20
  this.tokens = DOMTokenListService.parse(value)
@@ -4,9 +4,6 @@ import { PseudoElement } from '../interfaces/PseudoElement';
4
4
  /**
5
5
  * Simulate the behaviour of the DocumentFragment Class when there is no DOM available: a container for nodes which is
6
6
  * not part of a tree, when it is inserted its children are moved into the tree instead.
7
- * @author Joshua Heagle <joshuaheagle@gmail.com>
8
- * @class
9
- * @augments NodeService
10
7
  */
11
8
  export declare class DocumentFragmentService extends NodeService implements PseudoDocumentFragment {
12
9
  get nodeName(): string;
@@ -14,8 +11,7 @@ export declare class DocumentFragmentService extends NodeService implements Pseu
14
11
  /**
15
12
  * The first element, in tree order, whose id matches the given value, or null when there is none (the DOM's
16
13
  * NonElementParentNode mixin, which Document and DocumentFragment both implement).
17
- * @param {string} id
18
- * @returns {PseudoElement|null}
14
+ * @param id
19
15
  */
20
16
  getElementById(id: string): PseudoElement | null;
21
17
  }
@@ -16,9 +16,6 @@ const getElementById_1 = __importDefault(require('../functions/getElementById'))
16
16
  /**
17
17
  * Simulate the behaviour of the DocumentFragment Class when there is no DOM available: a container for nodes which is
18
18
  * not part of a tree, when it is inserted its children are moved into the tree instead.
19
- * @author Joshua Heagle <joshuaheagle@gmail.com>
20
- * @class
21
- * @augments NodeService
22
19
  */
23
20
  class DocumentFragmentService extends NodeService_1.NodeService {
24
21
  get nodeName () {
@@ -32,8 +29,7 @@ class DocumentFragmentService extends NodeService_1.NodeService {
32
29
  /**
33
30
  * The first element, in tree order, whose id matches the given value, or null when there is none (the DOM's
34
31
  * NonElementParentNode mixin, which Document and DocumentFragment both implement).
35
- * @param {string} id
36
- * @returns {PseudoElement|null}
32
+ * @param id
37
33
  */
38
34
  getElementById (id) {
39
35
  return (0, getElementById_1.default)(this, id)
@@ -4,9 +4,6 @@ import { PseudoElement } from '../interfaces/PseudoElement';
4
4
  import { DocumentFragmentService } from './DocumentFragmentService';
5
5
  /**
6
6
  * Simulate the behaviour of the Document Class when there is no DOM available.
7
- * @author Joshua Heagle <joshuaheagle@gmail.com>
8
- * @class
9
- * @augments NodeService
10
7
  */
11
8
  export declare class DocumentService extends NodeService implements PseudoDocument {
12
9
  get nodeName(): string;
@@ -15,32 +12,27 @@ export declare class DocumentService extends NodeService implements PseudoDocume
15
12
  set textContent(text: string | null);
16
13
  /**
17
14
  * The first element, in tree order, whose id matches the given value, or null when there is none.
18
- * @param {string} id
19
- * @returns {PseudoElement|null}
15
+ * @param id
20
16
  */
21
17
  getElementById(id: string): PseudoElement | null;
22
18
  /**
23
19
  * Make an element of the given type which belongs to this document but is not added anywhere until it is appended.
24
- * @param {string} [tagName='div'] The type of element to create
25
- * @returns {PseudoElement}
20
+ * @param tagName The type of element to create
26
21
  */
27
22
  createElement(tagName?: string): PseudoElement;
28
23
  /**
29
24
  * Make a text node which belongs to this document.
30
- * @param {string} [data=''] The text
31
- * @returns {TextService}
25
+ * @param data The text
32
26
  */
33
27
  createTextNode(data?: string): TextService;
34
28
  /**
35
29
  * Make a comment which belongs to this document.
36
- * @param {string} [data=''] The comment
37
- * @returns {CommentService}
30
+ * @param data The comment
38
31
  */
39
32
  createComment(data?: string): CommentService;
40
33
  /**
41
34
  * Make an empty document fragment which belongs to this document, a container for nodes which can be built up and
42
35
  * then inserted in one go.
43
- * @returns {DocumentFragmentService}
44
36
  */
45
37
  createDocumentFragment(): DocumentFragmentService;
46
38
  }
@@ -17,9 +17,6 @@ const DocumentFragmentService_1 = require('./DocumentFragmentService')
17
17
  const getElementById_1 = __importDefault(require('../functions/getElementById'))
18
18
  /**
19
19
  * Simulate the behaviour of the Document Class when there is no DOM available.
20
- * @author Joshua Heagle <joshuaheagle@gmail.com>
21
- * @class
22
- * @augments NodeService
23
20
  */
24
21
  class DocumentService extends NodeService_1.NodeService {
25
22
  get nodeName () {
@@ -38,8 +35,7 @@ class DocumentService extends NodeService_1.NodeService {
38
35
  set textContent (text) {}
39
36
  /**
40
37
  * The first element, in tree order, whose id matches the given value, or null when there is none.
41
- * @param {string} id
42
- * @returns {PseudoElement|null}
38
+ * @param id
43
39
  */
44
40
  getElementById (id) {
45
41
  return (0, getElementById_1.default)(this, id)
@@ -47,8 +43,7 @@ class DocumentService extends NodeService_1.NodeService {
47
43
 
48
44
  /**
49
45
  * Make an element of the given type which belongs to this document but is not added anywhere until it is appended.
50
- * @param {string} [tagName='div'] The type of element to create
51
- * @returns {PseudoElement}
46
+ * @param tagName The type of element to create
52
47
  */
53
48
  createElement (tagName = 'div') {
54
49
  // Like the DOM, the new element is not added anywhere: it has no parent until it is appended
@@ -61,8 +56,7 @@ class DocumentService extends NodeService_1.NodeService {
61
56
 
62
57
  /**
63
58
  * Make a text node which belongs to this document.
64
- * @param {string} [data=''] The text
65
- * @returns {TextService}
59
+ * @param data The text
66
60
  */
67
61
  createTextNode (data = '') {
68
62
  const text = new NodeService_1.TextService(data)
@@ -72,8 +66,7 @@ class DocumentService extends NodeService_1.NodeService {
72
66
 
73
67
  /**
74
68
  * Make a comment which belongs to this document.
75
- * @param {string} [data=''] The comment
76
- * @returns {CommentService}
69
+ * @param data The comment
77
70
  */
78
71
  createComment (data = '') {
79
72
  const comment = new NodeService_1.CommentService(data)
@@ -84,7 +77,6 @@ class DocumentService extends NodeService_1.NodeService {
84
77
  /**
85
78
  * Make an empty document fragment which belongs to this document, a container for nodes which can be built up and
86
79
  * then inserted in one go.
87
- * @returns {DocumentFragmentService}
88
80
  */
89
81
  createDocumentFragment () {
90
82
  const fragment = new DocumentFragmentService_1.DocumentFragmentService()