happy-dom 7.2.0 → 7.4.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.

Potentially problematic release.


This version of happy-dom might be problematic. Click here for more details.

Files changed (127) hide show
  1. package/lib/event/EventTarget.d.ts +14 -1
  2. package/lib/event/EventTarget.js +16 -1
  3. package/lib/event/EventTarget.js.map +1 -1
  4. package/lib/event/IEventTarget.d.ts +20 -0
  5. package/lib/event/NonImplementedEventTypes.js +2 -1
  6. package/lib/event/NonImplementedEventTypes.js.map +1 -1
  7. package/lib/fetch/IRequestInit.d.ts +1 -0
  8. package/lib/form-data/IFormData.d.ts +2 -0
  9. package/lib/index.d.ts +5 -1
  10. package/lib/index.js +5 -1
  11. package/lib/index.js.map +1 -1
  12. package/lib/nodes/attr/Attr.d.ts +1 -0
  13. package/lib/nodes/attr/Attr.js +1 -0
  14. package/lib/nodes/attr/Attr.js.map +1 -1
  15. package/lib/nodes/document/Document.d.ts +118 -1
  16. package/lib/nodes/document/Document.js +131 -1
  17. package/lib/nodes/document/Document.js.map +1 -1
  18. package/lib/nodes/document/IDocument.d.ts +118 -1
  19. package/lib/nodes/element/Element.d.ts +36 -0
  20. package/lib/nodes/element/Element.js +36 -0
  21. package/lib/nodes/element/Element.js.map +1 -1
  22. package/lib/nodes/element/IElement.d.ts +36 -0
  23. package/lib/nodes/html-dialog-element/HTMLDialogElement.d.ts +3 -0
  24. package/lib/nodes/html-dialog-element/HTMLDialogElement.js +3 -0
  25. package/lib/nodes/html-dialog-element/HTMLDialogElement.js.map +1 -1
  26. package/lib/nodes/html-dialog-element/IHTMLDialogElement.d.ts +3 -0
  27. package/lib/nodes/html-element/HTMLElement.d.ts +26 -0
  28. package/lib/nodes/html-element/HTMLElement.js +26 -0
  29. package/lib/nodes/html-element/HTMLElement.js.map +1 -1
  30. package/lib/nodes/html-element/IHTMLElement.d.ts +26 -0
  31. package/lib/nodes/html-form-element/HTMLFormElement.d.ts +4 -0
  32. package/lib/nodes/html-form-element/HTMLFormElement.js +7 -0
  33. package/lib/nodes/html-form-element/HTMLFormElement.js.map +1 -1
  34. package/lib/nodes/html-form-element/IHTMLFormElement.d.ts +4 -0
  35. package/lib/nodes/html-input-element/HTMLInputElement.d.ts +4 -0
  36. package/lib/nodes/html-input-element/HTMLInputElement.js +4 -0
  37. package/lib/nodes/html-input-element/HTMLInputElement.js.map +1 -1
  38. package/lib/nodes/html-input-element/IHTMLInputElement.d.ts +4 -0
  39. package/lib/nodes/html-media-element/HTMLMediaElement.d.ts +23 -8
  40. package/lib/nodes/html-media-element/HTMLMediaElement.js +15 -0
  41. package/lib/nodes/html-media-element/HTMLMediaElement.js.map +1 -1
  42. package/lib/nodes/html-media-element/IHTMLMediaElement.d.ts +24 -0
  43. package/lib/nodes/html-select-element/HTMLSelectElement.d.ts +3 -0
  44. package/lib/nodes/html-select-element/HTMLSelectElement.js +3 -0
  45. package/lib/nodes/html-select-element/HTMLSelectElement.js.map +1 -1
  46. package/lib/nodes/html-select-element/IHTMLSelectElement.d.ts +3 -0
  47. package/lib/nodes/html-slot-element/HTMLSlotElement.d.ts +2 -0
  48. package/lib/nodes/html-slot-element/HTMLSlotElement.js +5 -0
  49. package/lib/nodes/html-slot-element/HTMLSlotElement.js.map +1 -1
  50. package/lib/nodes/html-slot-element/IHTMLSlotElement.d.ts +2 -0
  51. package/lib/nodes/html-text-area-element/HTMLTextAreaElement.d.ts +4 -1
  52. package/lib/nodes/html-text-area-element/HTMLTextAreaElement.js +4 -1
  53. package/lib/nodes/html-text-area-element/HTMLTextAreaElement.js.map +1 -1
  54. package/lib/nodes/html-text-area-element/IHTMLTextAreaElement.d.ts +3 -0
  55. package/lib/nodes/node/INode.d.ts +8 -0
  56. package/lib/nodes/node/Node.d.ts +20 -0
  57. package/lib/nodes/node/Node.js +154 -0
  58. package/lib/nodes/node/Node.js.map +1 -1
  59. package/lib/nodes/node/NodeDocumentPositionEnum.d.ts +9 -0
  60. package/lib/nodes/node/NodeDocumentPositionEnum.js +13 -0
  61. package/lib/nodes/node/NodeDocumentPositionEnum.js.map +1 -0
  62. package/lib/nodes/node/NodeUtility.d.ts +16 -0
  63. package/lib/nodes/node/NodeUtility.js +100 -0
  64. package/lib/nodes/node/NodeUtility.js.map +1 -1
  65. package/lib/nodes/processing-instruction/IProcessingInstruction.d.ts +4 -0
  66. package/lib/nodes/processing-instruction/IProcessingInstruction.js +3 -0
  67. package/lib/nodes/processing-instruction/IProcessingInstruction.js.map +1 -0
  68. package/lib/nodes/processing-instruction/ProcessingInstruction.d.ts +12 -0
  69. package/lib/nodes/processing-instruction/ProcessingInstruction.js +20 -0
  70. package/lib/nodes/processing-instruction/ProcessingInstruction.js.map +1 -0
  71. package/lib/nodes/shadow-root/IShadowRoot.d.ts +2 -0
  72. package/lib/nodes/shadow-root/ShadowRoot.d.ts +2 -0
  73. package/lib/nodes/shadow-root/ShadowRoot.js +2 -0
  74. package/lib/nodes/shadow-root/ShadowRoot.js.map +1 -1
  75. package/lib/nodes/svg-element/ISVGElement.d.ts +7 -0
  76. package/lib/nodes/svg-element/ISVGSVGElement.d.ts +19 -0
  77. package/lib/nodes/svg-element/SVGElement.d.ts +7 -0
  78. package/lib/nodes/svg-element/SVGElement.js +7 -0
  79. package/lib/nodes/svg-element/SVGElement.js.map +1 -1
  80. package/lib/nodes/svg-element/SVGSVGElement.d.ts +19 -0
  81. package/lib/nodes/svg-element/SVGSVGElement.js +22 -0
  82. package/lib/nodes/svg-element/SVGSVGElement.js.map +1 -1
  83. package/lib/window/GlobalWindow.d.ts +2 -0
  84. package/lib/window/IWindow.d.ts +6 -0
  85. package/lib/window/Window.d.ts +5 -0
  86. package/lib/window/Window.js +2 -0
  87. package/lib/window/Window.js.map +1 -1
  88. package/package.json +2 -2
  89. package/src/event/EventTarget.ts +17 -1
  90. package/src/event/IEventTarget.ts +22 -0
  91. package/src/event/NonImplementedEventTypes.ts +2 -1
  92. package/src/index.ts +9 -1
  93. package/src/nodes/attr/Attr.ts +1 -0
  94. package/src/nodes/document/Document.ts +139 -1
  95. package/src/nodes/document/IDocument.ts +121 -1
  96. package/src/nodes/element/Element.ts +38 -0
  97. package/src/nodes/element/IElement.ts +38 -0
  98. package/src/nodes/html-dialog-element/HTMLDialogElement.ts +4 -0
  99. package/src/nodes/html-dialog-element/IHTMLDialogElement.ts +5 -0
  100. package/src/nodes/html-element/HTMLElement.ts +28 -0
  101. package/src/nodes/html-element/IHTMLElement.ts +28 -0
  102. package/src/nodes/html-form-element/HTMLFormElement.ts +6 -0
  103. package/src/nodes/html-form-element/IHTMLFormElement.ts +6 -0
  104. package/src/nodes/html-input-element/HTMLInputElement.ts +5 -0
  105. package/src/nodes/html-input-element/IHTMLInputElement.ts +6 -0
  106. package/src/nodes/html-media-element/HTMLMediaElement.ts +23 -8
  107. package/src/nodes/html-media-element/IHTMLMediaElement.ts +26 -0
  108. package/src/nodes/html-select-element/HTMLSelectElement.ts +5 -0
  109. package/src/nodes/html-select-element/IHTMLSelectElement.ts +5 -0
  110. package/src/nodes/html-slot-element/HTMLSlotElement.ts +4 -0
  111. package/src/nodes/html-slot-element/IHTMLSlotElement.ts +4 -0
  112. package/src/nodes/html-text-area-element/HTMLTextAreaElement.ts +6 -1
  113. package/src/nodes/html-text-area-element/IHTMLTextAreaElement.ts +5 -0
  114. package/src/nodes/node/INode.ts +8 -0
  115. package/src/nodes/node/Node.ts +191 -1
  116. package/src/nodes/node/NodeDocumentPositionEnum.ts +10 -0
  117. package/src/nodes/node/NodeUtility.ts +137 -0
  118. package/src/nodes/processing-instruction/IProcessingInstruction.ts +5 -0
  119. package/src/nodes/processing-instruction/ProcessingInstruction.ts +13 -0
  120. package/src/nodes/shadow-root/IShadowRoot.ts +4 -0
  121. package/src/nodes/shadow-root/ShadowRoot.ts +4 -0
  122. package/src/nodes/svg-element/ISVGElement.ts +9 -0
  123. package/src/nodes/svg-element/ISVGSVGElement.ts +21 -0
  124. package/src/nodes/svg-element/SVGElement.ts +9 -0
  125. package/src/nodes/svg-element/SVGSVGElement.ts +21 -0
  126. package/src/window/IWindow.ts +2 -0
  127. package/src/window/Window.ts +2 -0
@@ -0,0 +1,10 @@
1
+ enum NodeDocumentPositionEnum {
2
+ disconnect = 0x01,
3
+ preceding = 0x02,
4
+ following = 0x04,
5
+ contains = 0x08,
6
+ containedBy = 0x10,
7
+ implementationSpecific = 0x20
8
+ }
9
+
10
+ export default NodeDocumentPositionEnum;
@@ -2,6 +2,10 @@ import IText from '../text/IText';
2
2
  import IComment from '../comment/IComment';
3
3
  import INode from './INode';
4
4
  import NodeTypeEnum from './NodeTypeEnum';
5
+ import IElement from '../element/IElement';
6
+ import IDocumentType from '../document-type/IDocumentType';
7
+ import IAttr from '../attr/IAttr';
8
+ import IProcessingInstruction from '../processing-instruction/IProcessingInstruction';
5
9
 
6
10
  /**
7
11
  * Node utility.
@@ -136,4 +140,137 @@ export default class NodeUtility {
136
140
 
137
141
  return node.nextSibling;
138
142
  }
143
+
144
+ /**
145
+ * Needed by https://dom.spec.whatwg.org/#concept-node-equals
146
+ *
147
+ * @param elementA
148
+ * @param elementB
149
+ */
150
+ public static attributeListsEqual(elementA: IElement, elementB: IElement): boolean {
151
+ const listA = Object.values(elementA.attributes);
152
+ const listB = Object.values(elementB.attributes);
153
+
154
+ const lengthA = listA.length;
155
+ const lengthB = listB.length;
156
+
157
+ if (lengthA !== lengthB) {
158
+ return false;
159
+ }
160
+
161
+ for (let i = 0; i < lengthA; ++i) {
162
+ const attrA = listA[i];
163
+
164
+ if (
165
+ !listB.some((attrB) => {
166
+ return (
167
+ (typeof attrA === 'number' && typeof attrB === 'number' && attrA === attrB) ||
168
+ (typeof attrA === 'object' &&
169
+ typeof attrB === 'object' &&
170
+ NodeUtility.nodeEquals(attrA, attrB))
171
+ );
172
+ })
173
+ ) {
174
+ return false;
175
+ }
176
+ }
177
+
178
+ return true;
179
+ }
180
+
181
+ /**
182
+ * Check if node nodeA equals node nodeB.
183
+ * Reference: https://dom.spec.whatwg.org/#concept-node-equals
184
+ *
185
+ * @param nodeA Node A.
186
+ * @param nodeB Node B.
187
+ */
188
+ public static nodeEquals(nodeA: INode, nodeB: INode): boolean {
189
+ if (nodeA.nodeType !== nodeB.nodeType) {
190
+ return false;
191
+ }
192
+
193
+ switch (nodeA.nodeType) {
194
+ case NodeTypeEnum.documentTypeNode:
195
+ const documentTypeA = <IDocumentType>nodeA;
196
+ const documentTypeB = <IDocumentType>nodeB;
197
+
198
+ if (
199
+ documentTypeA.name !== documentTypeB.name ||
200
+ documentTypeA.publicId !== documentTypeB.publicId ||
201
+ documentTypeA.systemId !== documentTypeB.systemId
202
+ ) {
203
+ return false;
204
+ }
205
+ break;
206
+ case NodeTypeEnum.elementNode:
207
+ const elementA = <IElement>nodeA;
208
+ const elementB = <IElement>nodeB;
209
+
210
+ if (
211
+ elementA.namespaceURI !== elementB.namespaceURI ||
212
+ elementA.prefix !== elementB.prefix ||
213
+ elementA.localName !== elementB.localName ||
214
+ elementA.attributes.length !== elementB.attributes.length
215
+ ) {
216
+ return false;
217
+ }
218
+ break;
219
+ case NodeTypeEnum.attributeNode:
220
+ const attributeA = <IAttr>nodeA;
221
+ const attributeB = <IAttr>nodeB;
222
+
223
+ if (
224
+ attributeA.namespaceURI !== attributeB.namespaceURI ||
225
+ attributeA.localName !== attributeB.localName ||
226
+ attributeA.value !== attributeB.value
227
+ ) {
228
+ return false;
229
+ }
230
+ break;
231
+ case NodeTypeEnum.processingInstructionNode:
232
+ const processingInstructionA = <IProcessingInstruction>nodeA;
233
+ const processingInstructionB = <IProcessingInstruction>nodeB;
234
+
235
+ if (
236
+ processingInstructionA.target !== processingInstructionB.target ||
237
+ processingInstructionA.data !== processingInstructionB.data
238
+ ) {
239
+ return false;
240
+ }
241
+ break;
242
+ case NodeTypeEnum.textNode:
243
+ case NodeTypeEnum.commentNode:
244
+ type TextOrComment = IText | IComment;
245
+ const textOrCommentA = <TextOrComment>nodeA;
246
+ const textOrCommentB = <TextOrComment>nodeB;
247
+
248
+ if (textOrCommentA.data !== textOrCommentB.data) {
249
+ return false;
250
+ }
251
+ break;
252
+ }
253
+
254
+ if (
255
+ nodeA.nodeType === NodeTypeEnum.elementNode &&
256
+ !NodeUtility.attributeListsEqual(<IElement>nodeA, <IElement>nodeB)
257
+ ) {
258
+ return false;
259
+ }
260
+
261
+ if (nodeA.childNodes.length !== nodeB.childNodes.length) {
262
+ return false;
263
+ }
264
+
265
+ for (let i = 0; i < nodeA.childNodes.length; i++) {
266
+ const childNodeA = nodeA.childNodes[i];
267
+ const childNodeB = nodeB.childNodes[i];
268
+
269
+ if (!NodeUtility.nodeEquals(childNodeA, childNodeB)) {
270
+ return false;
271
+ }
272
+ }
273
+
274
+ return true;
275
+ }
139
276
  }
@@ -0,0 +1,5 @@
1
+ import ICharacterData from '../character-data/ICharacterData';
2
+
3
+ export default interface IProcessingInstruction extends ICharacterData {
4
+ target: string;
5
+ }
@@ -0,0 +1,13 @@
1
+ import IProcessingInstruction from './IProcessingInstruction';
2
+ import CharacterData from '../character-data/CharacterData';
3
+ import NodeTypeEnum from '../node/NodeTypeEnum';
4
+
5
+ /**
6
+ * Processing instruction node interface.
7
+ *
8
+ * Reference: https://developer.mozilla.org/en-US/docs/Web/API/ProcessingInstruction.
9
+ */
10
+ export default class ProcessingInstruction extends CharacterData implements IProcessingInstruction {
11
+ public readonly nodeType = NodeTypeEnum.processingInstructionNode;
12
+ public target: string;
13
+ }
@@ -1,5 +1,6 @@
1
1
  import IDocumentFragment from '../document-fragment/IDocumentFragment';
2
2
  import IElement from '../element/IElement';
3
+ import Event from '../../event/Event';
3
4
 
4
5
  /**
5
6
  * ShadowRoot.
@@ -9,6 +10,9 @@ export default interface IShadowRoot extends IDocumentFragment {
9
10
  innerHTML: string;
10
11
  host: IElement;
11
12
 
13
+ // Events
14
+ onslotchange: (event: Event) => void | null;
15
+
12
16
  /**
13
17
  * Clones a node.
14
18
  *
@@ -5,6 +5,7 @@ import IElement from '../element/IElement';
5
5
  import CSSStyleSheet from '../../css/CSSStyleSheet';
6
6
  import IShadowRoot from './IShadowRoot';
7
7
  import IHTMLElement from '../../nodes/html-element/IHTMLElement';
8
+ import Event from '../../event/Event';
8
9
 
9
10
  /**
10
11
  * ShadowRoot.
@@ -14,6 +15,9 @@ export default class ShadowRoot extends DocumentFragment implements IShadowRoot
14
15
  public readonly host: IElement = null;
15
16
  public adoptedStyleSheets: CSSStyleSheet[] = [];
16
17
 
18
+ // Events
19
+ public onslotchange: (event: Event) => void | null = null;
20
+
17
21
  /**
18
22
  * Returns inner HTML.
19
23
  *
@@ -1,3 +1,4 @@
1
+ import Event from '../../event/Event';
1
2
  import CSSStyleDeclaration from '../../css/declaration/CSSStyleDeclaration';
2
3
  import IElement from '../element/IElement';
3
4
  import ISVGSVGElement from './ISVGSVGElement';
@@ -12,4 +13,12 @@ export default interface ISVGElement extends IElement {
12
13
  readonly ownerSVGElement: ISVGSVGElement;
13
14
  readonly dataset: { [key: string]: string };
14
15
  readonly style: CSSStyleDeclaration;
16
+
17
+ // Events
18
+ onabort: (event: Event) => void | null;
19
+ onerror: (event: Event) => void | null;
20
+ onload: (event: Event) => void | null;
21
+ onresize: (event: Event) => void | null;
22
+ onscroll: (event: Event) => void | null;
23
+ onunload: (event: Event) => void | null;
15
24
  }
@@ -1,3 +1,4 @@
1
+ import Event from '../../event/Event';
1
2
  import INode from '../node/INode';
2
3
  import ISVGGraphicsElement from './ISVGGraphicsElement';
3
4
  import SVGAngle from './SVGAngle';
@@ -25,6 +26,26 @@ export default interface ISVGSVGElement extends ISVGGraphicsElement {
25
26
  currentTranslate: SVGPoint;
26
27
  viewBox: SVGAnimatedRect;
27
28
 
29
+ // Events
30
+ onafterprint: (event: Event) => void | null;
31
+ onbeforeprint: (event: Event) => void | null;
32
+ onbeforeunload: (event: Event) => void | null;
33
+ ongamepadconnected: (event: Event) => void | null;
34
+ ongamepaddisconnected: (event: Event) => void | null;
35
+ onhashchange: (event: Event) => void | null;
36
+ onlanguagechange: (event: Event) => void | null;
37
+ onmessage: (event: Event) => void | null;
38
+ onmessageerror: (event: Event) => void | null;
39
+ onoffline: (event: Event) => void | null;
40
+ ononline: (event: Event) => void | null;
41
+ onpagehide: (event: Event) => void | null;
42
+ onpageshow: (event: Event) => void | null;
43
+ onpopstate: (event: Event) => void | null;
44
+ onrejectionhandled: (event: Event) => void | null;
45
+ onstorage: (event: Event) => void | null;
46
+ onunhandledrejection: (event: Event) => void | null;
47
+ onunload: (event: Event) => void | null;
48
+
28
49
  /**
29
50
  * Pauses animation.
30
51
  */
@@ -3,6 +3,7 @@ import Element from '../element/Element';
3
3
  import ISVGElement from './ISVGElement';
4
4
  import ISVGSVGElement from './ISVGSVGElement';
5
5
  import IAttr from '../attr/IAttr';
6
+ import Event from '../../event/Event';
6
7
 
7
8
  /**
8
9
  * SVG Element.
@@ -11,6 +12,14 @@ import IAttr from '../attr/IAttr';
11
12
  * https://developer.mozilla.org/en-US/docs/Web/API/SVGElement.
12
13
  */
13
14
  export default class SVGElement extends Element implements ISVGElement {
15
+ // Events
16
+ public onabort: (event: Event) => void | null = null;
17
+ public onerror: (event: Event) => void | null = null;
18
+ public onload: (event: Event) => void | null = null;
19
+ public onresize: (event: Event) => void | null = null;
20
+ public onscroll: (event: Event) => void | null = null;
21
+ public onunload: (event: Event) => void | null = null;
22
+
14
23
  private _style: CSSStyleDeclaration = null;
15
24
 
16
25
  /**
@@ -8,11 +8,32 @@ import SVGTransform from './SVGTransform';
8
8
  import SVGAnimatedRect from './SVGAnimatedRect';
9
9
  import ISVGSVGElement from './ISVGSVGElement';
10
10
  import INode from '../node/INode';
11
+ import Event from '../../event/Event';
11
12
 
12
13
  /**
13
14
  * SVGSVGElement.
14
15
  */
15
16
  export default class SVGSVGElement extends SVGGraphicsElement implements ISVGSVGElement {
17
+ // Events
18
+ public onafterprint: (event: Event) => void | null = null;
19
+ public onbeforeprint: (event: Event) => void | null = null;
20
+ public onbeforeunload: (event: Event) => void | null = null;
21
+ public ongamepadconnected: (event: Event) => void | null = null;
22
+ public ongamepaddisconnected: (event: Event) => void | null = null;
23
+ public onhashchange: (event: Event) => void | null = null;
24
+ public onlanguagechange: (event: Event) => void | null = null;
25
+ public onmessage: (event: Event) => void | null = null;
26
+ public onmessageerror: (event: Event) => void | null = null;
27
+ public onoffline: (event: Event) => void | null = null;
28
+ public ononline: (event: Event) => void | null = null;
29
+ public onpagehide: (event: Event) => void | null = null;
30
+ public onpageshow: (event: Event) => void | null = null;
31
+ public onpopstate: (event: Event) => void | null = null;
32
+ public onrejectionhandled: (event: Event) => void | null = null;
33
+ public onstorage: (event: Event) => void | null = null;
34
+ public onunhandledrejection: (event: Event) => void | null = null;
35
+ public onunload: (event: Event) => void | null = null;
36
+
16
37
  /**
17
38
  * Returns preserveAspectRatio.
18
39
  *
@@ -98,6 +98,7 @@ import Attr from '../nodes/attr/Attr';
98
98
  import { URLSearchParams } from 'url';
99
99
  import { Performance } from 'perf_hooks';
100
100
  import IElement from '../nodes/element/IElement';
101
+ import ProcessingInstruction from '../nodes/processing-instruction/ProcessingInstruction';
101
102
 
102
103
  /**
103
104
  * Window without dependencies to server side specific packages.
@@ -142,6 +143,7 @@ export default interface IWindow extends IEventTarget, NodeJS.Global {
142
143
  readonly Element: typeof Element;
143
144
  readonly DocumentFragment: typeof DocumentFragment;
144
145
  readonly CharacterData: typeof CharacterData;
146
+ readonly ProcessingInstruction: typeof ProcessingInstruction;
145
147
  readonly NodeFilter: typeof NodeFilter;
146
148
  readonly TreeWalker: typeof TreeWalker;
147
149
  readonly DOMParser: typeof DOMParser;
@@ -109,6 +109,7 @@ import Base64 from '../base64/Base64';
109
109
  import IDocument from '../nodes/document/IDocument';
110
110
  import Attr from '../nodes/attr/Attr';
111
111
  import IElement from '../nodes/element/IElement';
112
+ import ProcessingInstruction from '../nodes/processing-instruction/ProcessingInstruction';
112
113
 
113
114
  const ORIGINAL_SET_TIMEOUT = setTimeout;
114
115
  const ORIGINAL_CLEAR_TIMEOUT = clearTimeout;
@@ -171,6 +172,7 @@ export default class Window extends EventTarget implements IWindow {
171
172
  public readonly Text = Text;
172
173
  public readonly Comment = Comment;
173
174
  public readonly ShadowRoot = ShadowRoot;
175
+ public readonly ProcessingInstruction = ProcessingInstruction;
174
176
  public readonly Element = Element;
175
177
  public readonly DocumentFragment = DocumentFragment;
176
178
  public readonly CharacterData = CharacterData;