happy-dom 2.55.0 → 3.0.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 (284) hide show
  1. package/README.md +26 -6
  2. package/lib/async-task-manager/AsyncTaskManager.js +34 -78
  3. package/lib/async-task-manager/AsyncTaskManager.js.map +1 -1
  4. package/lib/attribute/Attr.js +19 -28
  5. package/lib/attribute/Attr.js.map +1 -1
  6. package/lib/config/ElementTag.js +15 -15
  7. package/lib/config/ElementTag.js.map +1 -1
  8. package/lib/cookie/CookieUtility.js +21 -26
  9. package/lib/cookie/CookieUtility.js.map +1 -1
  10. package/lib/css/CSS.js +12 -18
  11. package/lib/css/CSS.js.map +1 -1
  12. package/lib/css/CSSParser.js +29 -33
  13. package/lib/css/CSSParser.js.map +1 -1
  14. package/lib/css/CSSRule.js +24 -29
  15. package/lib/css/CSSRule.js.map +1 -1
  16. package/lib/css/CSSStyleDeclaration.js +4516 -6005
  17. package/lib/css/CSSStyleDeclaration.js.map +1 -1
  18. package/lib/css/CSSStyleSheet.js +17 -59
  19. package/lib/css/CSSStyleSheet.js.map +1 -1
  20. package/lib/css/CSSUnitValue.js +4 -5
  21. package/lib/css/CSSUnitValue.js.map +1 -1
  22. package/lib/css/MediaList.js +23 -28
  23. package/lib/css/MediaList.js.map +1 -1
  24. package/lib/css/rules/CSSFontFaceRule.js +6 -24
  25. package/lib/css/rules/CSSFontFaceRule.js.map +1 -1
  26. package/lib/css/rules/CSSKeyframeRule.js +14 -36
  27. package/lib/css/rules/CSSKeyframeRule.js.map +1 -1
  28. package/lib/css/rules/CSSKeyframesRule.js +31 -54
  29. package/lib/css/rules/CSSKeyframesRule.js.map +1 -1
  30. package/lib/css/rules/CSSMediaRule.js +29 -56
  31. package/lib/css/rules/CSSMediaRule.js.map +1 -1
  32. package/lib/css/rules/CSSStyleRule.js +16 -38
  33. package/lib/css/rules/CSSStyleRule.js.map +1 -1
  34. package/lib/custom-element/CustomElementRegistry.js +21 -24
  35. package/lib/custom-element/CustomElementRegistry.js.map +1 -1
  36. package/lib/dom-implementation/DOMImplementation.js +12 -13
  37. package/lib/dom-implementation/DOMImplementation.js.map +1 -1
  38. package/lib/dom-parser/DOMParser.js +29 -35
  39. package/lib/dom-parser/DOMParser.js.map +1 -1
  40. package/lib/dom-token-list/DOMTokenList.js +64 -79
  41. package/lib/dom-token-list/DOMTokenList.js.map +1 -1
  42. package/lib/event/DataTransfer.js +4 -5
  43. package/lib/event/DataTransfer.js.map +1 -1
  44. package/lib/event/DataTransferItem.js +7 -8
  45. package/lib/event/DataTransferItem.js.map +1 -1
  46. package/lib/event/DataTransferItemList.js +10 -11
  47. package/lib/event/DataTransferItemList.js.map +1 -1
  48. package/lib/event/Event.js +11 -15
  49. package/lib/event/Event.js.map +1 -1
  50. package/lib/event/EventTarget.js +14 -16
  51. package/lib/event/EventTarget.js.map +1 -1
  52. package/lib/event/IUIEventInit.d.ts +2 -2
  53. package/lib/event/UIEvent.d.ts +2 -2
  54. package/lib/event/UIEvent.js +25 -46
  55. package/lib/event/UIEvent.js.map +1 -1
  56. package/lib/event/events/AnimationEvent.js +11 -29
  57. package/lib/event/events/AnimationEvent.js.map +1 -1
  58. package/lib/event/events/CustomEvent.js +9 -31
  59. package/lib/event/events/CustomEvent.js.map +1 -1
  60. package/lib/event/events/ErrorEvent.js +15 -34
  61. package/lib/event/events/ErrorEvent.js.map +1 -1
  62. package/lib/event/events/FocusEvent.js +7 -26
  63. package/lib/event/events/FocusEvent.js.map +1 -1
  64. package/lib/event/events/InputEvent.js +13 -32
  65. package/lib/event/events/InputEvent.js.map +1 -1
  66. package/lib/event/events/KeyboardEvent.js +27 -46
  67. package/lib/event/events/KeyboardEvent.js.map +1 -1
  68. package/lib/event/events/MouseEvent.js +33 -52
  69. package/lib/event/events/MouseEvent.js.map +1 -1
  70. package/lib/event/events/PointerEvent.js +25 -44
  71. package/lib/event/events/PointerEvent.js.map +1 -1
  72. package/lib/event/events/ProgressEvent.js +11 -30
  73. package/lib/event/events/ProgressEvent.js.map +1 -1
  74. package/lib/event/events/StorageEvent.js +13 -32
  75. package/lib/event/events/StorageEvent.js.map +1 -1
  76. package/lib/event/events/WheelEvent.js +16 -35
  77. package/lib/event/events/WheelEvent.js.map +1 -1
  78. package/lib/exception/DOMException.js +5 -24
  79. package/lib/exception/DOMException.js.map +1 -1
  80. package/lib/fetch/FetchHandler.js +18 -22
  81. package/lib/fetch/FetchHandler.js.map +1 -1
  82. package/lib/fetch/Headers.js +3 -23
  83. package/lib/fetch/Headers.js.map +1 -1
  84. package/lib/fetch/Request.js +61 -81
  85. package/lib/fetch/Request.js.map +1 -1
  86. package/lib/fetch/ResourceFetchHandler.js +18 -67
  87. package/lib/fetch/ResourceFetchHandler.js.map +1 -1
  88. package/lib/fetch/Response.js +61 -81
  89. package/lib/fetch/Response.js.map +1 -1
  90. package/lib/file/Blob.js +29 -78
  91. package/lib/file/Blob.js.map +1 -1
  92. package/lib/file/File.js +9 -27
  93. package/lib/file/File.js.map +1 -1
  94. package/lib/file/FileReader.js +57 -78
  95. package/lib/file/FileReader.js.map +1 -1
  96. package/lib/history/History.js +32 -37
  97. package/lib/history/History.js.map +1 -1
  98. package/lib/index.d.ts +3 -3
  99. package/lib/index.js +69 -69
  100. package/lib/index.js.map +1 -1
  101. package/lib/location/Location.js +11 -28
  102. package/lib/location/Location.js.map +1 -1
  103. package/lib/location/RelativeURL.js +5 -8
  104. package/lib/location/RelativeURL.js.map +1 -1
  105. package/lib/location/URL.js +46 -59
  106. package/lib/location/URL.js.map +1 -1
  107. package/lib/match-media/MediaQueryList.js +28 -54
  108. package/lib/match-media/MediaQueryList.js.map +1 -1
  109. package/lib/mutation-observer/MutationListener.js +3 -4
  110. package/lib/mutation-observer/MutationListener.js.map +1 -1
  111. package/lib/mutation-observer/MutationObserver.js +12 -13
  112. package/lib/mutation-observer/MutationObserver.js.map +1 -1
  113. package/lib/mutation-observer/MutationRecord.js +3 -4
  114. package/lib/mutation-observer/MutationRecord.js.map +1 -1
  115. package/lib/navigator/MimeType.js +5 -6
  116. package/lib/navigator/MimeType.js.map +1 -1
  117. package/lib/navigator/MimeTypeArray.js +10 -11
  118. package/lib/navigator/MimeTypeArray.js.map +1 -1
  119. package/lib/navigator/Navigator.js +7 -8
  120. package/lib/navigator/Navigator.js.map +1 -1
  121. package/lib/navigator/Plugin.js +10 -11
  122. package/lib/navigator/Plugin.js.map +1 -1
  123. package/lib/navigator/PluginArray.js +12 -13
  124. package/lib/navigator/PluginArray.js.map +1 -1
  125. package/lib/nodes/character-data/CharacterData.js +119 -184
  126. package/lib/nodes/character-data/CharacterData.js.map +1 -1
  127. package/lib/nodes/character-data/CharacterDataUtility.js +12 -15
  128. package/lib/nodes/character-data/CharacterDataUtility.js.map +1 -1
  129. package/lib/nodes/child-node/ChildNodeUtility.js +24 -45
  130. package/lib/nodes/child-node/ChildNodeUtility.js.map +1 -1
  131. package/lib/nodes/child-node/NonDocumentChildNodeUtility.js +9 -12
  132. package/lib/nodes/child-node/NonDocumentChildNodeUtility.js.map +1 -1
  133. package/lib/nodes/comment/Comment.js +20 -43
  134. package/lib/nodes/comment/Comment.js.map +1 -1
  135. package/lib/nodes/document/Document.d.ts +3 -3
  136. package/lib/nodes/document/Document.js +334 -461
  137. package/lib/nodes/document/Document.js.map +1 -1
  138. package/lib/nodes/document/DocumentReadyStateManager.js +16 -19
  139. package/lib/nodes/document/DocumentReadyStateManager.js.map +1 -1
  140. package/lib/nodes/document/IDocument.d.ts +2 -2
  141. package/lib/nodes/document-fragment/DocumentFragment.js +93 -153
  142. package/lib/nodes/document-fragment/DocumentFragment.js.map +1 -1
  143. package/lib/nodes/document-type/DocumentType.js +22 -45
  144. package/lib/nodes/document-type/DocumentType.js.map +1 -1
  145. package/lib/nodes/element/DOMRect.js +3 -4
  146. package/lib/nodes/element/DOMRect.js.map +1 -1
  147. package/lib/nodes/element/Element.js +367 -496
  148. package/lib/nodes/element/Element.js.map +1 -1
  149. package/lib/nodes/element/HTMLCollection.js +4 -24
  150. package/lib/nodes/element/HTMLCollection.js.map +1 -1
  151. package/lib/nodes/element/HTMLCollectionFactory.js +6 -9
  152. package/lib/nodes/element/HTMLCollectionFactory.js.map +1 -1
  153. package/lib/nodes/element/Range.js +89 -114
  154. package/lib/nodes/element/Range.js.map +1 -1
  155. package/lib/nodes/html-base-element/HTMLBaseElement.js +41 -70
  156. package/lib/nodes/html-base-element/HTMLBaseElement.js.map +1 -1
  157. package/lib/nodes/html-document/HTMLDocument.js +3 -23
  158. package/lib/nodes/html-document/HTMLDocument.js.map +1 -1
  159. package/lib/nodes/html-element/DatasetUtility.js +9 -12
  160. package/lib/nodes/html-element/DatasetUtility.js.map +1 -1
  161. package/lib/nodes/html-element/HTMLElement.js +232 -290
  162. package/lib/nodes/html-element/HTMLElement.js.map +1 -1
  163. package/lib/nodes/html-form-element/HTMLFormElement.js +170 -235
  164. package/lib/nodes/html-form-element/HTMLFormElement.js.map +1 -1
  165. package/lib/nodes/html-image-element/HTMLImageElement.js +178 -237
  166. package/lib/nodes/html-image-element/HTMLImageElement.js.map +1 -1
  167. package/lib/nodes/html-image-element/Image.js +7 -27
  168. package/lib/nodes/html-image-element/Image.js.map +1 -1
  169. package/lib/nodes/html-input-element/HTMLInputElement.js +705 -872
  170. package/lib/nodes/html-input-element/HTMLInputElement.js.map +1 -1
  171. package/lib/nodes/html-input-element/HTMLInputElementValueSanitizer.js +9 -12
  172. package/lib/nodes/html-input-element/HTMLInputElementValueSanitizer.js.map +1 -1
  173. package/lib/nodes/html-input-element/HTMLInputElementValueStepping.js +5 -8
  174. package/lib/nodes/html-input-element/HTMLInputElementValueStepping.js.map +1 -1
  175. package/lib/nodes/html-input-element/ValidityState.js +47 -69
  176. package/lib/nodes/html-input-element/ValidityState.js.map +1 -1
  177. package/lib/nodes/html-label-element/HTMLLabelElement.js +53 -87
  178. package/lib/nodes/html-label-element/HTMLLabelElement.js.map +1 -1
  179. package/lib/nodes/html-link-element/HTMLLinkElement.js +197 -252
  180. package/lib/nodes/html-link-element/HTMLLinkElement.js.map +1 -1
  181. package/lib/nodes/html-meta-element/HTMLMetaElement.js +66 -102
  182. package/lib/nodes/html-meta-element/HTMLMetaElement.js.map +1 -1
  183. package/lib/nodes/html-script-element/HTMLScriptElement.js +145 -193
  184. package/lib/nodes/html-script-element/HTMLScriptElement.js.map +1 -1
  185. package/lib/nodes/html-script-element/ScriptUtility.js +58 -112
  186. package/lib/nodes/html-script-element/ScriptUtility.js.map +1 -1
  187. package/lib/nodes/html-slot-element/HTMLSlotElement.js +33 -65
  188. package/lib/nodes/html-slot-element/HTMLSlotElement.js.map +1 -1
  189. package/lib/nodes/html-style-element/HTMLStyleElement.js +75 -109
  190. package/lib/nodes/html-style-element/HTMLStyleElement.js.map +1 -1
  191. package/lib/nodes/html-template-element/HTMLTemplateElement.js +60 -99
  192. package/lib/nodes/html-template-element/HTMLTemplateElement.js.map +1 -1
  193. package/lib/nodes/html-text-area-element/HTMLTextAreaElement.js +349 -444
  194. package/lib/nodes/html-text-area-element/HTMLTextAreaElement.js.map +1 -1
  195. package/lib/nodes/html-unknown-element/HTMLUnknownElement.js +17 -37
  196. package/lib/nodes/html-unknown-element/HTMLUnknownElement.js.map +1 -1
  197. package/lib/nodes/node/Node.js +193 -260
  198. package/lib/nodes/node/Node.js.map +1 -1
  199. package/lib/nodes/node/NodeList.js +4 -24
  200. package/lib/nodes/node/NodeList.js.map +1 -1
  201. package/lib/nodes/node/NodeListFactory.js +6 -9
  202. package/lib/nodes/node/NodeListFactory.js.map +1 -1
  203. package/lib/nodes/parent-node/ParentNodeUtility.js +43 -78
  204. package/lib/nodes/parent-node/ParentNodeUtility.js.map +1 -1
  205. package/lib/nodes/shadow-root/ShadowRoot.js +53 -83
  206. package/lib/nodes/shadow-root/ShadowRoot.js.map +1 -1
  207. package/lib/nodes/svg-document/SVGDocument.js +3 -23
  208. package/lib/nodes/svg-document/SVGDocument.js.map +1 -1
  209. package/lib/nodes/svg-element/DOMMatrix.js +3 -4
  210. package/lib/nodes/svg-element/DOMMatrix.js.map +1 -1
  211. package/lib/nodes/svg-element/SVGAngle.js +10 -11
  212. package/lib/nodes/svg-element/SVGAngle.js.map +1 -1
  213. package/lib/nodes/svg-element/SVGAnimatedRect.js +4 -5
  214. package/lib/nodes/svg-element/SVGAnimatedRect.js.map +1 -1
  215. package/lib/nodes/svg-element/SVGElement.js +58 -93
  216. package/lib/nodes/svg-element/SVGElement.js.map +1 -1
  217. package/lib/nodes/svg-element/SVGGraphicsElement.js +14 -32
  218. package/lib/nodes/svg-element/SVGGraphicsElement.js.map +1 -1
  219. package/lib/nodes/svg-element/SVGLength.js +16 -17
  220. package/lib/nodes/svg-element/SVGLength.js.map +1 -1
  221. package/lib/nodes/svg-element/SVGNumber.js +3 -4
  222. package/lib/nodes/svg-element/SVGNumber.js.map +1 -1
  223. package/lib/nodes/svg-element/SVGPoint.js +3 -4
  224. package/lib/nodes/svg-element/SVGPoint.js.map +1 -1
  225. package/lib/nodes/svg-element/SVGRect.js +3 -4
  226. package/lib/nodes/svg-element/SVGRect.js.map +1 -1
  227. package/lib/nodes/svg-element/SVGSVGElement.js +187 -248
  228. package/lib/nodes/svg-element/SVGSVGElement.js.map +1 -1
  229. package/lib/nodes/svg-element/SVGTransform.js +16 -17
  230. package/lib/nodes/svg-element/SVGTransform.js.map +1 -1
  231. package/lib/nodes/text/Text.js +20 -43
  232. package/lib/nodes/text/Text.js.map +1 -1
  233. package/lib/nodes/xml-document/XMLDocument.js +3 -23
  234. package/lib/nodes/xml-document/XMLDocument.js.map +1 -1
  235. package/lib/query-selector/QuerySelector.js +36 -44
  236. package/lib/query-selector/QuerySelector.js.map +1 -1
  237. package/lib/query-selector/SelectorItem.js +62 -66
  238. package/lib/query-selector/SelectorItem.js.map +1 -1
  239. package/lib/resize-observer/ResizeObserver.js +8 -11
  240. package/lib/resize-observer/ResizeObserver.js.map +1 -1
  241. package/lib/screen/Screen.js +3 -4
  242. package/lib/screen/Screen.js.map +1 -1
  243. package/lib/selection/Selection.js +29 -30
  244. package/lib/selection/Selection.js.map +1 -1
  245. package/lib/storage/Storage.js +22 -27
  246. package/lib/storage/Storage.js.map +1 -1
  247. package/lib/tree-walker/NodeFilterMask.js +1 -1
  248. package/lib/tree-walker/NodeFilterMask.js.map +1 -1
  249. package/lib/tree-walker/TreeWalker.js +30 -33
  250. package/lib/tree-walker/TreeWalker.js.map +1 -1
  251. package/lib/window/GlobalWindow.d.ts +84 -0
  252. package/lib/window/GlobalWindow.js +90 -0
  253. package/lib/window/GlobalWindow.js.map +1 -0
  254. package/lib/window/IWindow.d.ts +29 -18
  255. package/lib/window/VMGlobalPropertyScript.d.ts +2 -0
  256. package/lib/window/VMGlobalPropertyScript.js +65 -0
  257. package/lib/window/VMGlobalPropertyScript.js.map +1 -0
  258. package/lib/window/Window.d.ts +70 -105
  259. package/lib/window/Window.js +269 -491
  260. package/lib/window/Window.js.map +1 -1
  261. package/lib/xml-parser/XMLParser.js +65 -71
  262. package/lib/xml-parser/XMLParser.js.map +1 -1
  263. package/lib/xml-serializer/XMLSerializer.js +30 -37
  264. package/lib/xml-serializer/XMLSerializer.js.map +1 -1
  265. package/package.json +6 -7
  266. package/src/dom-parser/DOMParser.ts +4 -5
  267. package/src/event/IUIEventInit.ts +2 -2
  268. package/src/event/UIEvent.ts +2 -2
  269. package/src/fetch/FetchHandler.ts +3 -3
  270. package/src/fetch/ResourceFetchHandler.ts +3 -3
  271. package/src/index.ts +3 -3
  272. package/src/nodes/document/Document.ts +4 -4
  273. package/src/nodes/document/IDocument.ts +2 -2
  274. package/src/nodes/html-link-element/HTMLLinkElement.ts +8 -2
  275. package/src/nodes/html-script-element/ScriptUtility.ts +4 -4
  276. package/src/window/GlobalWindow.ts +82 -0
  277. package/src/window/IWindow.ts +24 -12
  278. package/src/window/VMGlobalPropertyScript.ts +62 -0
  279. package/src/window/Window.ts +104 -173
  280. package/tsconfig.json +1 -1
  281. package/lib/window/AsyncWindow.d.ts +0 -10
  282. package/lib/window/AsyncWindow.js +0 -38
  283. package/lib/window/AsyncWindow.js.map +0 -1
  284. package/src/window/AsyncWindow.ts +0 -17
@@ -0,0 +1,84 @@
1
+ /// <reference types="node" />
2
+ import Window from './Window';
3
+ /**
4
+ * Browser window.
5
+ *
6
+ * Reference:
7
+ * https://developer.mozilla.org/en-US/docs/Web/API/Window.
8
+ */
9
+ export default class GlobalWindow extends Window {
10
+ ArrayBuffer: ArrayBufferConstructor;
11
+ Boolean: BooleanConstructor;
12
+ Buffer: typeof Buffer;
13
+ DataView: DataViewConstructor;
14
+ Date: DateConstructor;
15
+ Error: ErrorConstructor;
16
+ EvalError: EvalErrorConstructor;
17
+ Float32Array: Float32ArrayConstructor;
18
+ Float64Array: Float64ArrayConstructor;
19
+ GLOBAL: any;
20
+ Infinity: number;
21
+ Int16Array: Int16ArrayConstructor;
22
+ Int32Array: Int32ArrayConstructor;
23
+ Int8Array: Int8ArrayConstructor;
24
+ Intl: typeof Intl;
25
+ JSON: JSON;
26
+ Map: MapConstructor;
27
+ Math: Math;
28
+ NaN: number;
29
+ Number: NumberConstructor;
30
+ Promise: PromiseConstructor;
31
+ RangeError: RangeErrorConstructor;
32
+ ReferenceError: ReferenceErrorConstructor;
33
+ RegExp: RegExpConstructor;
34
+ Reflect: ArrayBufferConstructor;
35
+ Set: SetConstructor;
36
+ Symbol: SymbolConstructor;
37
+ SyntaxError: SyntaxErrorConstructor;
38
+ String: StringConstructor;
39
+ TypeError: TypeErrorConstructor;
40
+ URIError: URIErrorConstructor;
41
+ Uint16Array: Uint16ArrayConstructor;
42
+ Uint32Array: Uint32ArrayConstructor;
43
+ Uint8Array: Uint8ArrayConstructor;
44
+ Uint8ClampedArray: Uint8ClampedArrayConstructor;
45
+ WeakMap: WeakMapConstructor;
46
+ WeakSet: WeakSetConstructor;
47
+ clearImmediate: typeof clearImmediate;
48
+ decodeURI: typeof decodeURI;
49
+ decodeURIComponent: typeof decodeURIComponent;
50
+ encodeURI: typeof encodeURI;
51
+ encodeURIComponent: typeof encodeURIComponent;
52
+ escape: typeof escape;
53
+ global: NodeJS.Global & typeof globalThis;
54
+ isFinite: typeof isFinite;
55
+ isNaN: typeof isNaN;
56
+ parseFloat: typeof parseFloat;
57
+ parseInt: typeof parseInt;
58
+ process: NodeJS.Process;
59
+ root: ArrayBufferConstructor;
60
+ setImmediate: typeof setImmediate;
61
+ queueMicrotask: typeof queueMicrotask;
62
+ undefined: ArrayBufferConstructor;
63
+ unescape: typeof unescape;
64
+ gc: any;
65
+ v8debug: any;
66
+ AbortController: {
67
+ new (): AbortController;
68
+ prototype: AbortController;
69
+ };
70
+ AbortSignal: {
71
+ new (): AbortSignal;
72
+ prototype: AbortSignal;
73
+ };
74
+ Array: ArrayConstructor;
75
+ Object: ObjectConstructor;
76
+ Function: FunctionConstructor;
77
+ /**
78
+ * Evaluates code.
79
+ *
80
+ * @param code Code.
81
+ * @returns Result.
82
+ */
83
+ eval(code: string): unknown;
84
+ }
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const Window_1 = __importDefault(require("./Window"));
7
+ /**
8
+ * Browser window.
9
+ *
10
+ * Reference:
11
+ * https://developer.mozilla.org/en-US/docs/Web/API/Window.
12
+ */
13
+ class GlobalWindow extends Window_1.default {
14
+ constructor() {
15
+ super(...arguments);
16
+ // Node.js Globals
17
+ this.ArrayBuffer = globalThis.ArrayBuffer;
18
+ this.Boolean = globalThis.Boolean;
19
+ this.Buffer = globalThis.global ? globalThis.global.Buffer : Buffer;
20
+ this.DataView = globalThis.DataView;
21
+ this.Date = globalThis.Date;
22
+ this.Error = globalThis.Error;
23
+ this.EvalError = globalThis.EvalError;
24
+ this.Float32Array = globalThis.Float32Array;
25
+ this.Float64Array = globalThis.Float64Array;
26
+ this.GLOBAL = globalThis.GLOBAL;
27
+ this.Infinity = globalThis.Infinity;
28
+ this.Int16Array = globalThis.Int16Array;
29
+ this.Int32Array = globalThis.Int32Array;
30
+ this.Int8Array = globalThis.Int8Array;
31
+ this.Intl = globalThis.Intl;
32
+ this.JSON = globalThis.JSON;
33
+ this.Map = globalThis.Map;
34
+ this.Math = globalThis.Math;
35
+ this.NaN = globalThis.NaN;
36
+ this.Number = globalThis.Number;
37
+ this.Promise = globalThis.Promise;
38
+ this.RangeError = globalThis.RangeError;
39
+ this.ReferenceError = globalThis.ReferenceError;
40
+ this.RegExp = globalThis.RegExp;
41
+ this.Reflect = globalThis.ArrayBuffer;
42
+ this.Set = globalThis.Set;
43
+ this.Symbol = globalThis.Symbol;
44
+ this.SyntaxError = globalThis.SyntaxError;
45
+ this.String = globalThis.String;
46
+ this.TypeError = globalThis.TypeError;
47
+ this.URIError = globalThis.URIError;
48
+ this.Uint16Array = globalThis.Uint16Array;
49
+ this.Uint32Array = globalThis.Uint32Array;
50
+ this.Uint8Array = globalThis.Uint8Array;
51
+ this.Uint8ClampedArray = globalThis.Uint8ClampedArray;
52
+ this.WeakMap = globalThis.WeakMap;
53
+ this.WeakSet = globalThis.WeakSet;
54
+ this.clearImmediate = globalThis.clearImmediate;
55
+ this.decodeURI = globalThis.decodeURI;
56
+ this.decodeURIComponent = globalThis.decodeURIComponent;
57
+ this.encodeURI = globalThis.encodeURI;
58
+ this.encodeURIComponent = globalThis.encodeURIComponent;
59
+ this.escape = globalThis.escape;
60
+ this.global = globalThis.global;
61
+ this.isFinite = globalThis.isFinite;
62
+ this.isNaN = globalThis.isNaN;
63
+ this.parseFloat = globalThis.parseFloat;
64
+ this.parseInt = globalThis.parseInt;
65
+ this.process = globalThis.process;
66
+ this.root = globalThis.ArrayBuffer;
67
+ this.setImmediate = globalThis.setImmediate;
68
+ this.queueMicrotask = globalThis.queueMicrotask;
69
+ this.undefined = globalThis.ArrayBuffer;
70
+ this.unescape = globalThis.unescape;
71
+ this.gc = globalThis.gc;
72
+ this.v8debug = globalThis.v8debug;
73
+ this.AbortController = globalThis.AbortController;
74
+ this.AbortSignal = globalThis.AbortSignal;
75
+ this.Array = globalThis.Array;
76
+ this.Object = globalThis.Object;
77
+ this.Function = globalThis.Function;
78
+ }
79
+ /**
80
+ * Evaluates code.
81
+ *
82
+ * @param code Code.
83
+ * @returns Result.
84
+ */
85
+ eval(code) {
86
+ return eval(code);
87
+ }
88
+ }
89
+ exports.default = GlobalWindow;
90
+ //# sourceMappingURL=GlobalWindow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GlobalWindow.js","sourceRoot":"","sources":["../../src/window/GlobalWindow.ts"],"names":[],"mappings":"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"}
@@ -12,6 +12,7 @@ import Element from '../nodes/element/Element';
12
12
  import HTMLTemplateElement from '../nodes/html-template-element/HTMLTemplateElement';
13
13
  import HTMLFormElement from '../nodes/html-form-element/HTMLFormElement';
14
14
  import HTMLElement from '../nodes/html-element/HTMLElement';
15
+ import IHTMLElement from '../nodes/html-element/IHTMLElement';
15
16
  import HTMLUnknownElement from '../nodes/html-unknown-element/HTMLUnknownElement';
16
17
  import HTMLInputElement from '../nodes/html-input-element/HTMLInputElement';
17
18
  import HTMLTextAreaElement from '../nodes/html-text-area-element/HTMLTextAreaElement';
@@ -63,14 +64,8 @@ import ErrorEvent from '../event/events/ErrorEvent';
63
64
  import StorageEvent from '../event/events/StorageEvent';
64
65
  import Screen from '../screen/Screen';
65
66
  import AsyncTaskManager from '../async-task-manager/AsyncTaskManager';
66
- import IResponse from '../fetch/IResponse';
67
- import IResponseInit from '../fetch/IResponseInit';
68
- import IRequest from '../fetch/IRequest';
69
- import IRequestInit from '../fetch/IRequestInit';
70
- import IHeaders from '../fetch/IHeaders';
71
67
  import Storage from '../storage/Storage';
72
68
  import NodeFilter from '../tree-walker/NodeFilter';
73
- import Window from './Window';
74
69
  import HTMLCollection from '../nodes/element/HTMLCollection';
75
70
  import NodeList from '../nodes/node/NodeList';
76
71
  import Selection from '../selection/Selection';
@@ -80,11 +75,19 @@ import MimeType from '../navigator/MimeType';
80
75
  import MimeTypeArray from '../navigator/MimeTypeArray';
81
76
  import Plugin from '../navigator/Plugin';
82
77
  import PluginArray from '../navigator/PluginArray';
78
+ import IResponseInit from '../fetch/IResponseInit';
79
+ import IRequest from '../fetch/IRequest';
80
+ import IHeaders from '../fetch/IHeaders';
81
+ import IRequestInit from '../fetch/IRequestInit';
82
+ import IResponse from '../fetch/IResponse';
83
+ import MediaQueryList from '../match-media/MediaQueryList';
84
+ import Window from './Window';
83
85
  import { URLSearchParams } from 'url';
86
+ import { Performance } from 'perf_hooks';
84
87
  /**
85
- * Window.
88
+ * Window without dependencies to server side specific packages.
86
89
  */
87
- export default interface IWindow extends IEventTarget {
90
+ export default interface IWindow extends IEventTarget, NodeJS.Global {
88
91
  readonly happyDOM: {
89
92
  whenAsyncComplete: () => Promise<void>;
90
93
  cancelAsync: () => void;
@@ -143,15 +146,6 @@ export default interface IWindow extends IEventTarget {
143
146
  readonly Location: typeof Location;
144
147
  readonly CustomElementRegistry: typeof CustomElementRegistry;
145
148
  readonly Window: typeof Window;
146
- readonly Headers: {
147
- new (init?: string[][] | Record<string, string> | IHeaders): IHeaders;
148
- };
149
- readonly Request: {
150
- new (input: string | IRequest, init?: IRequestInit): IRequest;
151
- };
152
- readonly Response: {
153
- new (body?: unknown | null, init?: IResponseInit): IResponse;
154
- };
155
149
  readonly XMLSerializer: typeof XMLSerializer;
156
150
  readonly ResizeObserver: typeof ResizeObserver;
157
151
  readonly CSSStyleSheet: typeof CSSStyleSheet;
@@ -173,6 +167,15 @@ export default interface IWindow extends IEventTarget {
173
167
  readonly MimeTypeArray: typeof MimeTypeArray;
174
168
  readonly Plugin: typeof Plugin;
175
169
  readonly PluginArray: typeof PluginArray;
170
+ readonly Headers: {
171
+ new (init?: string[][] | Record<string, string> | IHeaders): IHeaders;
172
+ };
173
+ readonly Request: {
174
+ new (input: string | IRequest, init?: IRequestInit): IRequest;
175
+ };
176
+ readonly Response: {
177
+ new (body?: unknown | null, init?: IResponseInit): IResponse;
178
+ };
176
179
  onload: (event: Event) => void;
177
180
  onerror: (event: ErrorEvent) => void;
178
181
  readonly document: Document;
@@ -191,6 +194,7 @@ export default interface IWindow extends IEventTarget {
191
194
  readonly innerHeight: number;
192
195
  readonly sessionStorage: Storage;
193
196
  readonly localStorage: Storage;
197
+ readonly performance: Performance;
194
198
  /**
195
199
  * Evaluates code.
196
200
  *
@@ -204,7 +208,7 @@ export default interface IWindow extends IEventTarget {
204
208
  * @param element Element.
205
209
  * @returns CSS style declaration.
206
210
  */
207
- getComputedStyle(element: HTMLElement): CSSStyleDeclaration;
211
+ getComputedStyle(element: IHTMLElement): CSSStyleDeclaration;
208
212
  /**
209
213
  * Scrolls to a particular set of coordinates.
210
214
  *
@@ -227,6 +231,13 @@ export default interface IWindow extends IEventTarget {
227
231
  left?: number;
228
232
  behavior?: string;
229
233
  } | number, y?: number): void;
234
+ /**
235
+ * Returns a new MediaQueryList object that can then be used to determine if the document matches the media query string.
236
+ *
237
+ * @param mediaQueryString A string specifying the media query to parse into a MediaQueryList.
238
+ * @returns A new MediaQueryList.
239
+ */
240
+ matchMedia(mediaQueryString: string): MediaQueryList;
230
241
  /**
231
242
  * Sets a timer which executes a function once the timer expires.
232
243
  *
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nthis.ArrayBuffer = globalThis.ArrayBuffer;\nthis.Boolean = globalThis.Boolean;\nthis.DataView = globalThis.DataView;\nthis.Date = globalThis.Date;\nthis.Error = globalThis.Error;\nthis.EvalError = globalThis.EvalError;\nthis.Float32Array = globalThis.Float32Array;\nthis.Float64Array = globalThis.Float64Array;\nthis.GLOBAL = globalThis.GLOBAL;\nthis.Infinity = globalThis.Infinity;\nthis.Int16Array = globalThis.Int16Array;\nthis.Int32Array = globalThis.Int32Array;\nthis.Int8Array = globalThis.Int8Array;\nthis.Intl = globalThis.Intl;\nthis.JSON = globalThis.JSON;\nthis.Map = globalThis.Map;\nthis.Math = globalThis.Math;\nthis.NaN = globalThis.NaN;\nthis.Number = globalThis.Number;\nthis.Promise = globalThis.Promise;\nthis.RangeError = globalThis.RangeError;\nthis.ReferenceError = globalThis.ReferenceError;\nthis.RegExp = globalThis.RegExp;\nthis.Reflect = globalThis.Reflect;\nthis.Set = globalThis.Set;\nthis.Symbol = globalThis.Symbol;\nthis.SyntaxError = globalThis.SyntaxError;\nthis.String = globalThis.String;\nthis.TypeError = globalThis.TypeError;\nthis.URIError = globalThis.URIError;\nthis.Uint16Array = globalThis.Uint16Array;\nthis.Uint32Array = globalThis.Uint32Array;\nthis.Uint8Array = globalThis.Uint8Array;\nthis.Uint8ClampedArray = globalThis.Uint8ClampedArray;\nthis.WeakMap = globalThis.WeakMap;\nthis.WeakSet = globalThis.WeakSet;\nthis.clearImmediate = globalThis.clearImmediate;\nthis.decodeURI = globalThis.decodeURI;\nthis.decodeURIComponent = globalThis.decodeURIComponent;\nthis.encodeURI = globalThis.encodeURI;\nthis.encodeURIComponent = globalThis.encodeURIComponent;\nthis.escape = globalThis.escape;\nthis.global = globalThis.global;\nthis.isFinite = globalThis.isFinite;\nthis.isNaN = globalThis.isNaN;\nthis.parseFloat = globalThis.parseFloat;\nthis.parseInt = globalThis.parseInt;\nthis.process = globalThis.process;\nthis.root = globalThis.root;\nthis.setImmediate = globalThis.setImmediate;\nthis.queueMicrotask = globalThis.queueMicrotask;\nthis.undefined = globalThis.undefined;\nthis.unescape = globalThis.unescape;\nthis.gc = globalThis.gc;\nthis.v8debug = globalThis.v8debug;\nthis.AbortController = globalThis.AbortController;\nthis.AbortSignal = globalThis.AbortSignal;\nthis.Array = globalThis.Array;\nthis.Object = globalThis.Object;\nthis.Function = globalThis.Function;\n";
2
+ export default _default;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = `
4
+ this.ArrayBuffer = globalThis.ArrayBuffer;
5
+ this.Boolean = globalThis.Boolean;
6
+ this.DataView = globalThis.DataView;
7
+ this.Date = globalThis.Date;
8
+ this.Error = globalThis.Error;
9
+ this.EvalError = globalThis.EvalError;
10
+ this.Float32Array = globalThis.Float32Array;
11
+ this.Float64Array = globalThis.Float64Array;
12
+ this.GLOBAL = globalThis.GLOBAL;
13
+ this.Infinity = globalThis.Infinity;
14
+ this.Int16Array = globalThis.Int16Array;
15
+ this.Int32Array = globalThis.Int32Array;
16
+ this.Int8Array = globalThis.Int8Array;
17
+ this.Intl = globalThis.Intl;
18
+ this.JSON = globalThis.JSON;
19
+ this.Map = globalThis.Map;
20
+ this.Math = globalThis.Math;
21
+ this.NaN = globalThis.NaN;
22
+ this.Number = globalThis.Number;
23
+ this.Promise = globalThis.Promise;
24
+ this.RangeError = globalThis.RangeError;
25
+ this.ReferenceError = globalThis.ReferenceError;
26
+ this.RegExp = globalThis.RegExp;
27
+ this.Reflect = globalThis.Reflect;
28
+ this.Set = globalThis.Set;
29
+ this.Symbol = globalThis.Symbol;
30
+ this.SyntaxError = globalThis.SyntaxError;
31
+ this.String = globalThis.String;
32
+ this.TypeError = globalThis.TypeError;
33
+ this.URIError = globalThis.URIError;
34
+ this.Uint16Array = globalThis.Uint16Array;
35
+ this.Uint32Array = globalThis.Uint32Array;
36
+ this.Uint8Array = globalThis.Uint8Array;
37
+ this.Uint8ClampedArray = globalThis.Uint8ClampedArray;
38
+ this.WeakMap = globalThis.WeakMap;
39
+ this.WeakSet = globalThis.WeakSet;
40
+ this.clearImmediate = globalThis.clearImmediate;
41
+ this.decodeURI = globalThis.decodeURI;
42
+ this.decodeURIComponent = globalThis.decodeURIComponent;
43
+ this.encodeURI = globalThis.encodeURI;
44
+ this.encodeURIComponent = globalThis.encodeURIComponent;
45
+ this.escape = globalThis.escape;
46
+ this.global = globalThis.global;
47
+ this.isFinite = globalThis.isFinite;
48
+ this.isNaN = globalThis.isNaN;
49
+ this.parseFloat = globalThis.parseFloat;
50
+ this.parseInt = globalThis.parseInt;
51
+ this.process = globalThis.process;
52
+ this.root = globalThis.root;
53
+ this.setImmediate = globalThis.setImmediate;
54
+ this.queueMicrotask = globalThis.queueMicrotask;
55
+ this.undefined = globalThis.undefined;
56
+ this.unescape = globalThis.unescape;
57
+ this.gc = globalThis.gc;
58
+ this.v8debug = globalThis.v8debug;
59
+ this.AbortController = globalThis.AbortController;
60
+ this.AbortSignal = globalThis.AbortSignal;
61
+ this.Array = globalThis.Array;
62
+ this.Object = globalThis.Object;
63
+ this.Function = globalThis.Function;
64
+ `;
65
+ //# sourceMappingURL=VMGlobalPropertyScript.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VMGlobalPropertyScript.js","sourceRoot":"","sources":["../../src/window/VMGlobalPropertyScript.ts"],"names":[],"mappings":";;AAAA,kBAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Dd,CAAC"}
@@ -75,17 +75,20 @@ import HTMLCollection from '../nodes/element/HTMLCollection';
75
75
  import NodeList from '../nodes/node/NodeList';
76
76
  import MediaQueryList from '../match-media/MediaQueryList';
77
77
  import Selection from '../selection/Selection';
78
- import * as PerfHooks from 'perf_hooks';
79
78
  import Navigator from '../navigator/Navigator';
80
79
  import MimeType from '../navigator/MimeType';
81
80
  import MimeTypeArray from '../navigator/MimeTypeArray';
82
81
  import Plugin from '../navigator/Plugin';
83
82
  import PluginArray from '../navigator/PluginArray';
84
83
  import { URLSearchParams } from 'url';
84
+ import * as PerfHooks from 'perf_hooks';
85
85
  /**
86
- * Handles the Window.
86
+ * Browser window.
87
+ *
88
+ * Reference:
89
+ * https://developer.mozilla.org/en-US/docs/Web/API/Window.
87
90
  */
88
- export default class Window extends EventTarget implements IWindow, NodeJS.Global {
91
+ export default class Window extends EventTarget implements IWindow {
89
92
  readonly happyDOM: {
90
93
  whenAsyncComplete: () => Promise<void>;
91
94
  cancelAsync: () => void;
@@ -182,6 +185,17 @@ export default class Window extends EventTarget implements IWindow, NodeJS.Globa
182
185
  readonly MimeTypeArray: typeof MimeTypeArray;
183
186
  readonly Plugin: typeof Plugin;
184
187
  readonly PluginArray: typeof PluginArray;
188
+ readonly Headers: {
189
+ new (init?: IHeadersInit): IHeaders;
190
+ };
191
+ readonly Request: {
192
+ new (input: string | {
193
+ href: string;
194
+ } | IRequest, init?: IRequestInit): IRequest;
195
+ };
196
+ readonly Response: {
197
+ new (body?: NodeJS.ReadableStream | null, init?: IResponseInit): IResponse;
198
+ };
185
199
  onload: (event: Event) => void;
186
200
  onerror: (event: ErrorEvent) => void;
187
201
  readonly document: Document;
@@ -202,130 +216,81 @@ export default class Window extends EventTarget implements IWindow, NodeJS.Globa
202
216
  readonly sessionStorage: Storage;
203
217
  readonly localStorage: Storage;
204
218
  readonly performance: PerfHooks.Performance;
205
- ArrayBuffer: ArrayBufferConstructor;
206
- Boolean: BooleanConstructor;
207
- Buffer: any;
208
- DataView: DataViewConstructor;
209
- Date: DateConstructor;
210
- Error: ErrorConstructor;
211
- EvalError: EvalErrorConstructor;
212
- Float32Array: Float32ArrayConstructor;
213
- Float64Array: Float64ArrayConstructor;
219
+ ArrayBuffer: any;
220
+ Boolean: any;
221
+ Buffer: typeof globalThis.Buffer;
222
+ DataView: any;
223
+ Date: any;
224
+ Error: any;
225
+ EvalError: any;
226
+ Float32Array: any;
227
+ Float64Array: any;
214
228
  GLOBAL: any;
215
- Infinity: number;
216
- Int16Array: Int16ArrayConstructor;
217
- Int32Array: Int32ArrayConstructor;
218
- Int8Array: Int8ArrayConstructor;
219
- Intl: typeof Intl;
220
- JSON: JSON;
221
- Map: MapConstructor;
222
- Math: Math;
223
- NaN: number;
224
- Number: NumberConstructor;
225
- Promise: PromiseConstructor;
226
- RangeError: RangeErrorConstructor;
227
- ReferenceError: ReferenceErrorConstructor;
228
- RegExp: RegExpConstructor;
229
- Reflect: typeof Reflect;
230
- Set: SetConstructor;
231
- Symbol: Function & SymbolConstructor;
232
- SyntaxError: SyntaxErrorConstructor;
233
- String: StringConstructor;
234
- TypeError: TypeErrorConstructor;
235
- URIError: URIErrorConstructor;
236
- Uint16Array: Uint16ArrayConstructor;
237
- Uint32Array: Uint32ArrayConstructor;
238
- Uint8Array: Uint8ArrayConstructor;
239
- Uint8ClampedArray: Uint8ClampedArrayConstructor;
240
- WeakMap: WeakMapConstructor;
241
- WeakSet: WeakSetConstructor;
229
+ Infinity: any;
230
+ Int16Array: any;
231
+ Int32Array: any;
232
+ Int8Array: any;
233
+ Intl: any;
234
+ JSON: any;
235
+ Map: any;
236
+ Math: any;
237
+ NaN: any;
238
+ Number: any;
239
+ Promise: any;
240
+ RangeError: any;
241
+ ReferenceError: any;
242
+ RegExp: any;
243
+ Reflect: any;
244
+ Set: any;
245
+ Symbol: any;
246
+ SyntaxError: any;
247
+ String: any;
248
+ TypeError: any;
249
+ URIError: any;
250
+ Uint16Array: any;
251
+ Uint32Array: any;
252
+ Uint8Array: any;
253
+ Uint8ClampedArray: any;
254
+ WeakMap: any;
255
+ WeakSet: any;
242
256
  clearImmediate: any;
243
- decodeURI: typeof decodeURI;
244
- decodeURIComponent: typeof decodeURIComponent;
245
- encodeURI: typeof encodeURI;
246
- encodeURIComponent: typeof encodeURIComponent;
247
- escape: ((str: string) => string) & typeof escape;
257
+ decodeURI: any;
258
+ decodeURIComponent: any;
259
+ encodeURI: any;
260
+ encodeURIComponent: any;
261
+ escape: any;
248
262
  global: any;
249
- isFinite: typeof isFinite;
250
- isNaN: typeof isNaN;
251
- parseFloat: typeof parseFloat;
252
- parseInt: typeof parseInt;
263
+ isFinite: any;
264
+ isNaN: any;
265
+ parseFloat: any;
266
+ parseInt: any;
253
267
  process: any;
254
268
  root: any;
255
269
  setImmediate: any;
256
- queueMicrotask: typeof queueMicrotask;
270
+ queueMicrotask: any;
257
271
  undefined: any;
258
- unescape: ((str: string) => string) & typeof unescape;
272
+ unescape: any;
259
273
  gc: any;
260
274
  v8debug: any;
261
- AbortController: {
262
- new (): AbortController;
263
- prototype: AbortController;
264
- };
265
- AbortSignal: {
266
- new (): AbortSignal;
267
- prototype: AbortSignal;
268
- };
269
- private _objectClass;
270
- private _arrayClass;
271
- private _functionClass;
275
+ AbortController: any;
276
+ AbortSignal: any;
277
+ Array: any;
278
+ Object: any;
279
+ Function: any;
272
280
  /**
273
281
  * Constructor.
274
282
  */
275
283
  constructor();
276
- /**
277
- * Returns Object class.
278
- *
279
- * @returns Object class.
280
- */
281
- get Object(): typeof globalThis.Object;
282
- /**
283
- * Returns Array class.
284
- *
285
- * @returns Array class.
286
- */
287
- get Array(): typeof globalThis.Array;
288
- /**
289
- * Returns Function class.
290
- *
291
- * @returns Function class.
292
- */
293
- get Function(): typeof globalThis.Function;
294
284
  /**
295
285
  * The CSS interface holds useful CSS-related methods.
296
286
  *
297
287
  * @returns CSS interface.
298
288
  */
299
289
  get CSS(): CSS;
300
- /**
301
- * Returns Headers class.
302
- *
303
- * @returns Headers.
304
- */
305
- get Headers(): {
306
- new (init?: IHeadersInit): IHeaders;
307
- };
308
- /**
309
- * Returns Request class.
310
- *
311
- * @returns Request.
312
- */
313
- get Request(): {
314
- new (input: string | {
315
- href: string;
316
- } | IRequest, init?: IRequestInit): IRequest;
317
- };
318
- /**
319
- * Returns Response class.
320
- *
321
- * @returns Response.
322
- */
323
- get Response(): {
324
- new (body?: NodeJS.ReadableStream | null, init?: IResponseInit): IResponse;
325
- };
326
290
  /**
327
291
  * Evaluates code.
328
292
  *
293
+ * @override
329
294
  * @param code Code.
330
295
  * @returns Result.
331
296
  */