happy-dom 8.8.0 → 9.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 (364) hide show
  1. package/README.md +2 -2
  2. package/lib/cookie/CookieJar.js +1 -1
  3. package/lib/cookie/CookieJar.js.map +1 -1
  4. package/lib/dom-token-list/DOMTokenList.js +24 -20
  5. package/lib/dom-token-list/DOMTokenList.js.map +1 -1
  6. package/lib/event/EventTarget.js +6 -3
  7. package/lib/event/EventTarget.js.map +1 -1
  8. package/lib/exception/DOMExceptionNameEnum.d.ts +5 -1
  9. package/lib/exception/DOMExceptionNameEnum.js +4 -0
  10. package/lib/exception/DOMExceptionNameEnum.js.map +1 -1
  11. package/lib/fetch/AbortController.d.ts +19 -0
  12. package/lib/fetch/AbortController.js +30 -0
  13. package/lib/fetch/AbortController.js.map +1 -0
  14. package/lib/fetch/AbortSignal.d.ts +25 -0
  15. package/lib/fetch/AbortSignal.js +51 -0
  16. package/lib/fetch/AbortSignal.js.map +1 -0
  17. package/lib/fetch/Fetch.d.ts +117 -0
  18. package/lib/fetch/Fetch.js +530 -0
  19. package/lib/fetch/Fetch.js.map +1 -0
  20. package/lib/fetch/Headers.d.ts +81 -3
  21. package/lib/fetch/Headers.js +139 -24
  22. package/lib/fetch/Headers.js.map +1 -1
  23. package/lib/fetch/Request.d.ts +56 -32
  24. package/lib/fetch/Request.js +165 -110
  25. package/lib/fetch/Request.js.map +1 -1
  26. package/lib/fetch/{ResourceFetchHandler.d.ts → ResourceFetch.d.ts} +1 -1
  27. package/lib/fetch/{ResourceFetchHandler.js → ResourceFetch.js} +5 -5
  28. package/lib/fetch/ResourceFetch.js.map +1 -0
  29. package/lib/fetch/Response.d.ts +60 -26
  30. package/lib/fetch/Response.js +196 -104
  31. package/lib/fetch/Response.js.map +1 -1
  32. package/lib/fetch/data-uri/DataURIParser.d.ts +20 -0
  33. package/lib/fetch/data-uri/DataURIParser.js +60 -0
  34. package/lib/fetch/data-uri/DataURIParser.js.map +1 -0
  35. package/lib/fetch/multipart/MultipartFormDataParser.d.ts +40 -0
  36. package/lib/fetch/multipart/MultipartFormDataParser.js +81 -0
  37. package/lib/fetch/multipart/MultipartFormDataParser.js.map +1 -0
  38. package/lib/fetch/multipart/MultipartReader.d.ts +49 -0
  39. package/lib/fetch/multipart/MultipartReader.js +178 -0
  40. package/lib/fetch/multipart/MultipartReader.js.map +1 -0
  41. package/lib/fetch/types/IHeaders.d.ts +71 -0
  42. package/lib/fetch/{IHeaders.js.map → types/IHeaders.js.map} +1 -1
  43. package/lib/fetch/types/IHeadersInit.js.map +1 -0
  44. package/lib/fetch/types/IRequest.d.ts +60 -0
  45. package/lib/fetch/{IRequest.js.map → types/IRequest.js.map} +1 -1
  46. package/lib/fetch/types/IRequestBody.d.ts +7 -0
  47. package/lib/fetch/{IBody.js → types/IRequestBody.js} +1 -1
  48. package/lib/fetch/types/IRequestBody.js.map +1 -0
  49. package/lib/fetch/types/IRequestCredentials.d.ts +2 -0
  50. package/lib/fetch/types/IRequestCredentials.js +3 -0
  51. package/lib/fetch/types/IRequestCredentials.js.map +1 -0
  52. package/lib/fetch/{RequestInfo.d.ts → types/IRequestInfo.d.ts} +2 -2
  53. package/lib/fetch/types/IRequestInfo.js +3 -0
  54. package/lib/fetch/types/IRequestInfo.js.map +1 -0
  55. package/lib/fetch/types/IRequestInit.d.ts +21 -0
  56. package/lib/fetch/types/IRequestInit.js.map +1 -0
  57. package/lib/fetch/types/IRequestRedirect.d.ts +2 -0
  58. package/lib/fetch/types/IRequestRedirect.js +3 -0
  59. package/lib/fetch/types/IRequestRedirect.js.map +1 -0
  60. package/lib/fetch/types/IRequestReferrerPolicy.d.ts +2 -0
  61. package/lib/fetch/types/IRequestReferrerPolicy.js +3 -0
  62. package/lib/fetch/types/IRequestReferrerPolicy.js.map +1 -0
  63. package/lib/fetch/types/IResponse.d.ts +27 -0
  64. package/lib/fetch/{IResponse.js.map → types/IResponse.js.map} +1 -1
  65. package/lib/fetch/types/IResponseBody.d.ts +7 -0
  66. package/lib/fetch/types/IResponseBody.js +3 -0
  67. package/lib/fetch/types/IResponseBody.js.map +1 -0
  68. package/lib/fetch/types/IResponseInit.d.ts +9 -0
  69. package/lib/fetch/types/IResponseInit.js.map +1 -0
  70. package/lib/fetch/utilities/FetchBodyUtility.d.ts +44 -0
  71. package/lib/fetch/utilities/FetchBodyUtility.js +156 -0
  72. package/lib/fetch/utilities/FetchBodyUtility.js.map +1 -0
  73. package/lib/fetch/utilities/FetchCORSUtility.d.ts +12 -0
  74. package/lib/fetch/utilities/FetchCORSUtility.js +20 -0
  75. package/lib/fetch/utilities/FetchCORSUtility.js.map +1 -0
  76. package/lib/fetch/utilities/FetchRequestHeaderUtility.d.ts +12 -0
  77. package/lib/fetch/utilities/FetchRequestHeaderUtility.js +45 -0
  78. package/lib/fetch/utilities/FetchRequestHeaderUtility.js.map +1 -0
  79. package/lib/fetch/utilities/FetchRequestReferrerUtility.d.ts +55 -0
  80. package/lib/fetch/utilities/FetchRequestReferrerUtility.js +194 -0
  81. package/lib/fetch/utilities/FetchRequestReferrerUtility.js.map +1 -0
  82. package/lib/fetch/utilities/FetchRequestValidationUtility.d.ts +38 -0
  83. package/lib/fetch/utilities/FetchRequestValidationUtility.js +70 -0
  84. package/lib/fetch/utilities/FetchRequestValidationUtility.js.map +1 -0
  85. package/lib/file/Blob.d.ts +2 -2
  86. package/lib/file/Blob.js +1 -1
  87. package/lib/file/Blob.js.map +1 -1
  88. package/lib/file/File.d.ts +2 -1
  89. package/lib/file/File.js.map +1 -1
  90. package/lib/form-data/FormData.d.ts +98 -0
  91. package/lib/form-data/FormData.js +212 -0
  92. package/lib/form-data/FormData.js.map +1 -0
  93. package/lib/index.d.ts +14 -1
  94. package/lib/index.js +20 -2
  95. package/lib/index.js.map +1 -1
  96. package/lib/nodes/document/Document.d.ts +5 -17
  97. package/lib/nodes/document/Document.js +11 -54
  98. package/lib/nodes/document/Document.js.map +1 -1
  99. package/lib/nodes/document/IDocument.d.ts +1 -1
  100. package/lib/nodes/document-fragment/DocumentFragment.d.ts +3 -14
  101. package/lib/nodes/document-fragment/DocumentFragment.js +7 -51
  102. package/lib/nodes/document-fragment/DocumentFragment.js.map +1 -1
  103. package/lib/nodes/document-fragment/IDocumentFragment.d.ts +2 -1
  104. package/lib/nodes/element/Element.d.ts +8 -8
  105. package/lib/nodes/element/Element.js +28 -45
  106. package/lib/nodes/element/Element.js.map +1 -1
  107. package/lib/nodes/element/ElementUtility.d.ts +32 -0
  108. package/lib/nodes/element/ElementUtility.js +105 -0
  109. package/lib/nodes/element/ElementUtility.js.map +1 -0
  110. package/lib/nodes/element/HTMLCollection.d.ts +26 -3
  111. package/lib/nodes/element/HTMLCollection.js +51 -0
  112. package/lib/nodes/element/HTMLCollection.js.map +1 -1
  113. package/lib/nodes/element/IHTMLCollection.d.ts +9 -2
  114. package/lib/nodes/html-anchor-element/HTMLAnchorElement.js +24 -24
  115. package/lib/nodes/html-anchor-element/HTMLAnchorElement.js.map +1 -1
  116. package/lib/nodes/html-audio-element/Audio.d.ts +15 -0
  117. package/lib/nodes/html-audio-element/Audio.js +27 -0
  118. package/lib/nodes/html-audio-element/Audio.js.map +1 -0
  119. package/lib/nodes/html-base-element/HTMLBaseElement.js +4 -4
  120. package/lib/nodes/html-base-element/HTMLBaseElement.js.map +1 -1
  121. package/lib/nodes/html-button-element/HTMLButtonElement.d.ts +79 -3
  122. package/lib/nodes/html-button-element/HTMLButtonElement.js +158 -10
  123. package/lib/nodes/html-button-element/HTMLButtonElement.js.map +1 -1
  124. package/lib/nodes/html-button-element/IHTMLButtonElement.d.ts +28 -2
  125. package/lib/nodes/html-dialog-element/HTMLDialogElement.js +3 -3
  126. package/lib/nodes/html-dialog-element/HTMLDialogElement.js.map +1 -1
  127. package/lib/nodes/html-element/HTMLElement.js +12 -12
  128. package/lib/nodes/html-element/HTMLElement.js.map +1 -1
  129. package/lib/nodes/html-form-element/HTMLFormControlsCollection.d.ts +32 -0
  130. package/lib/nodes/html-form-element/HTMLFormControlsCollection.js +58 -0
  131. package/lib/nodes/html-form-element/HTMLFormControlsCollection.js.map +1 -0
  132. package/lib/nodes/html-form-element/HTMLFormElement.d.ts +37 -17
  133. package/lib/nodes/html-form-element/HTMLFormElement.js +128 -37
  134. package/lib/nodes/html-form-element/HTMLFormElement.js.map +1 -1
  135. package/lib/nodes/html-form-element/IHTMLFormControlsCollection.d.ts +25 -0
  136. package/lib/nodes/html-form-element/IHTMLFormControlsCollection.js +3 -0
  137. package/lib/nodes/html-form-element/IHTMLFormControlsCollection.js.map +1 -0
  138. package/lib/nodes/html-form-element/IHTMLFormElement.d.ts +16 -6
  139. package/lib/nodes/html-form-element/IRadioNodeList.d.ts +15 -0
  140. package/lib/nodes/html-form-element/IRadioNodeList.js +3 -0
  141. package/lib/nodes/html-form-element/IRadioNodeList.js.map +1 -0
  142. package/lib/nodes/html-form-element/RadioNodeList.d.ts +16 -0
  143. package/lib/nodes/html-form-element/RadioNodeList.js +28 -0
  144. package/lib/nodes/html-form-element/RadioNodeList.js.map +1 -0
  145. package/lib/nodes/html-image-element/HTMLImageElement.js +19 -19
  146. package/lib/nodes/html-image-element/HTMLImageElement.js.map +1 -1
  147. package/lib/nodes/html-input-element/HTMLInputElement.d.ts +43 -19
  148. package/lib/nodes/html-input-element/HTMLInputElement.js +206 -111
  149. package/lib/nodes/html-input-element/HTMLInputElement.js.map +1 -1
  150. package/lib/nodes/html-input-element/IHTMLInputElement.d.ts +14 -1
  151. package/lib/nodes/html-label-element/HTMLLabelElement.js +3 -7
  152. package/lib/nodes/html-label-element/HTMLLabelElement.js.map +1 -1
  153. package/lib/nodes/html-link-element/HTMLLinkElement.js +21 -21
  154. package/lib/nodes/html-link-element/HTMLLinkElement.js.map +1 -1
  155. package/lib/nodes/html-media-element/HTMLMediaElement.js +21 -21
  156. package/lib/nodes/html-media-element/HTMLMediaElement.js.map +1 -1
  157. package/lib/nodes/html-meta-element/HTMLMetaElement.js +8 -8
  158. package/lib/nodes/html-meta-element/HTMLMetaElement.js.map +1 -1
  159. package/lib/nodes/html-opt-group-element/HTMLOptGroupElement.js +6 -6
  160. package/lib/nodes/html-opt-group-element/HTMLOptGroupElement.js.map +1 -1
  161. package/lib/nodes/html-option-element/HTMLOptionElement.d.ts +3 -4
  162. package/lib/nodes/html-option-element/HTMLOptionElement.js +26 -29
  163. package/lib/nodes/html-option-element/HTMLOptionElement.js.map +1 -1
  164. package/lib/nodes/html-script-element/HTMLScriptElement.js +16 -16
  165. package/lib/nodes/html-script-element/HTMLScriptElement.js.map +1 -1
  166. package/lib/nodes/html-script-element/ScriptUtility.js +5 -5
  167. package/lib/nodes/html-script-element/ScriptUtility.js.map +1 -1
  168. package/lib/nodes/{html-option-element → html-select-element}/HTMLOptionsCollection.d.ts +5 -6
  169. package/lib/nodes/{html-option-element → html-select-element}/HTMLOptionsCollection.js.map +1 -1
  170. package/lib/nodes/html-select-element/HTMLSelectElement.d.ts +42 -41
  171. package/lib/nodes/html-select-element/HTMLSelectElement.js +134 -138
  172. package/lib/nodes/html-select-element/HTMLSelectElement.js.map +1 -1
  173. package/lib/nodes/{html-option-element → html-select-element}/IHTMLOptionsCollection.d.ts +4 -5
  174. package/lib/nodes/html-select-element/IHTMLOptionsCollection.js.map +1 -0
  175. package/lib/nodes/html-select-element/IHTMLSelectElement.d.ts +22 -2
  176. package/lib/nodes/html-slot-element/HTMLSlotElement.js +2 -2
  177. package/lib/nodes/html-slot-element/HTMLSlotElement.js.map +1 -1
  178. package/lib/nodes/html-style-element/HTMLStyleElement.js +7 -7
  179. package/lib/nodes/html-style-element/HTMLStyleElement.js.map +1 -1
  180. package/lib/nodes/html-text-area-element/HTMLTextAreaElement.d.ts +55 -2
  181. package/lib/nodes/html-text-area-element/HTMLTextAreaElement.js +150 -40
  182. package/lib/nodes/html-text-area-element/HTMLTextAreaElement.js.map +1 -1
  183. package/lib/nodes/html-text-area-element/IHTMLTextAreaElement.d.ts +16 -0
  184. package/lib/nodes/node/Node.d.ts +12 -1
  185. package/lib/nodes/node/Node.js +50 -4
  186. package/lib/nodes/node/Node.js.map +1 -1
  187. package/lib/nodes/node/NodeList.d.ts +2 -3
  188. package/lib/nodes/node/NodeList.js.map +1 -1
  189. package/lib/nodes/parent-node/IParentNode.d.ts +4 -4
  190. package/lib/nodes/parent-node/ParentNodeUtility.d.ts +3 -3
  191. package/lib/nodes/parent-node/ParentNodeUtility.js +13 -11
  192. package/lib/nodes/parent-node/ParentNodeUtility.js.map +1 -1
  193. package/lib/nodes/text/Text.d.ts +13 -0
  194. package/lib/nodes/text/Text.js +30 -0
  195. package/lib/nodes/text/Text.js.map +1 -1
  196. package/lib/query-selector/QuerySelector.js +2 -2
  197. package/lib/query-selector/QuerySelector.js.map +1 -1
  198. package/lib/query-selector/SelectorItem.js +2 -0
  199. package/lib/query-selector/SelectorItem.js.map +1 -1
  200. package/lib/validity-state/ValidityState.d.ts +87 -0
  201. package/lib/validity-state/ValidityState.js +171 -0
  202. package/lib/validity-state/ValidityState.js.map +1 -0
  203. package/lib/window/GlobalWindow.d.ts +0 -8
  204. package/lib/window/GlobalWindow.js +0 -2
  205. package/lib/window/GlobalWindow.js.map +1 -1
  206. package/lib/window/INodeJSGlobal.d.ts +71 -0
  207. package/lib/window/INodeJSGlobal.js +2 -0
  208. package/lib/window/INodeJSGlobal.js.map +1 -0
  209. package/lib/window/IWindow.d.ts +30 -10
  210. package/lib/window/Window.d.ts +37 -20
  211. package/lib/window/Window.js +22 -10
  212. package/lib/window/Window.js.map +1 -1
  213. package/lib/xml-http-request/XMLHttpRequest.js +20 -12
  214. package/lib/xml-http-request/XMLHttpRequest.js.map +1 -1
  215. package/lib/xml-parser/XMLParser.js +1 -1
  216. package/lib/xml-parser/XMLParser.js.map +1 -1
  217. package/package.json +2 -3
  218. package/src/cookie/CookieJar.ts +1 -1
  219. package/src/dom-token-list/DOMTokenList.ts +24 -20
  220. package/src/event/EventTarget.ts +7 -3
  221. package/src/exception/DOMExceptionNameEnum.ts +5 -1
  222. package/src/fetch/AbortController.ts +26 -0
  223. package/src/fetch/AbortSignal.ts +44 -0
  224. package/src/fetch/Fetch.ts +666 -0
  225. package/src/fetch/Headers.ts +151 -3
  226. package/src/fetch/Request.ts +226 -94
  227. package/src/fetch/{ResourceFetchHandler.ts → ResourceFetch.ts} +3 -3
  228. package/src/fetch/Response.ts +252 -89
  229. package/src/fetch/data-uri/DataURIParser.ts +66 -0
  230. package/src/fetch/multipart/MultipartFormDataParser.ts +113 -0
  231. package/src/fetch/multipart/MultipartReader.ts +217 -0
  232. package/src/fetch/types/IHeaders.ts +80 -0
  233. package/src/fetch/types/IRequest.ts +65 -0
  234. package/src/fetch/types/IRequestBody.ts +15 -0
  235. package/src/fetch/types/IRequestCredentials.ts +2 -0
  236. package/src/fetch/types/IRequestInfo.ts +6 -0
  237. package/src/fetch/types/IRequestInit.ts +21 -0
  238. package/src/fetch/types/IRequestRedirect.ts +3 -0
  239. package/src/fetch/types/IRequestReferrerPolicy.ts +11 -0
  240. package/src/fetch/types/IResponse.ts +27 -0
  241. package/src/fetch/types/IResponseBody.ts +15 -0
  242. package/src/fetch/types/IResponseInit.ts +10 -0
  243. package/src/fetch/utilities/FetchBodyUtility.ts +175 -0
  244. package/src/fetch/utilities/FetchCORSUtility.ts +18 -0
  245. package/src/fetch/utilities/FetchRequestHeaderUtility.ts +47 -0
  246. package/src/fetch/utilities/FetchRequestReferrerUtility.ts +241 -0
  247. package/src/fetch/utilities/FetchRequestValidationUtility.ts +82 -0
  248. package/src/file/Blob.ts +2 -2
  249. package/src/file/File.ts +5 -1
  250. package/src/form-data/FormData.ts +237 -0
  251. package/src/index.ts +27 -1
  252. package/src/nodes/document/Document.ts +23 -64
  253. package/src/nodes/document/IDocument.ts +1 -1
  254. package/src/nodes/document-fragment/DocumentFragment.ts +9 -59
  255. package/src/nodes/document-fragment/IDocumentFragment.ts +2 -1
  256. package/src/nodes/element/Element.ts +43 -56
  257. package/src/nodes/element/ElementUtility.ts +137 -0
  258. package/src/nodes/element/HTMLCollection.ts +60 -3
  259. package/src/nodes/element/IHTMLCollection.ts +10 -2
  260. package/src/nodes/html-anchor-element/HTMLAnchorElement.ts +24 -24
  261. package/src/nodes/html-audio-element/Audio.ts +22 -0
  262. package/src/nodes/html-base-element/HTMLBaseElement.ts +4 -4
  263. package/src/nodes/html-button-element/HTMLButtonElement.ts +184 -10
  264. package/src/nodes/html-button-element/IHTMLButtonElement.ts +31 -2
  265. package/src/nodes/html-dialog-element/HTMLDialogElement.ts +3 -3
  266. package/src/nodes/html-element/HTMLElement.ts +12 -12
  267. package/src/nodes/html-form-element/HTMLFormControlsCollection.ts +76 -0
  268. package/src/nodes/html-form-element/HTMLFormElement.ts +147 -41
  269. package/src/nodes/html-form-element/IHTMLFormControlsCollection.ts +45 -0
  270. package/src/nodes/html-form-element/IHTMLFormElement.ts +17 -6
  271. package/src/nodes/html-form-element/IRadioNodeList.ts +16 -0
  272. package/src/nodes/html-form-element/RadioNodeList.ts +24 -0
  273. package/src/nodes/html-image-element/HTMLImageElement.ts +19 -19
  274. package/src/nodes/html-input-element/HTMLInputElement.ts +232 -113
  275. package/src/nodes/html-input-element/IHTMLInputElement.ts +20 -1
  276. package/src/nodes/html-label-element/HTMLLabelElement.ts +3 -7
  277. package/src/nodes/html-link-element/HTMLLinkElement.ts +21 -21
  278. package/src/nodes/html-media-element/HTMLMediaElement.ts +21 -21
  279. package/src/nodes/html-meta-element/HTMLMetaElement.ts +8 -8
  280. package/src/nodes/html-opt-group-element/HTMLOptGroupElement.ts +6 -6
  281. package/src/nodes/html-option-element/HTMLOptionElement.ts +29 -30
  282. package/src/nodes/html-script-element/HTMLScriptElement.ts +16 -16
  283. package/src/nodes/html-script-element/ScriptUtility.ts +5 -5
  284. package/src/nodes/{html-option-element → html-select-element}/HTMLOptionsCollection.ts +5 -9
  285. package/src/nodes/html-select-element/HTMLSelectElement.ts +159 -170
  286. package/src/nodes/{html-option-element → html-select-element}/IHTMLOptionsCollection.ts +4 -8
  287. package/src/nodes/html-select-element/IHTMLSelectElement.ts +25 -2
  288. package/src/nodes/html-slot-element/HTMLSlotElement.ts +2 -2
  289. package/src/nodes/html-style-element/HTMLStyleElement.ts +7 -7
  290. package/src/nodes/html-text-area-element/HTMLTextAreaElement.ts +174 -41
  291. package/src/nodes/html-text-area-element/IHTMLTextAreaElement.ts +18 -0
  292. package/src/nodes/node/Node.ts +61 -6
  293. package/src/nodes/node/NodeList.ts +2 -3
  294. package/src/nodes/parent-node/IParentNode.ts +7 -4
  295. package/src/nodes/parent-node/ParentNodeUtility.ts +25 -15
  296. package/src/nodes/text/Text.ts +38 -0
  297. package/src/query-selector/QuerySelector.ts +2 -2
  298. package/src/query-selector/SelectorItem.ts +3 -0
  299. package/src/validity-state/ValidityState.ts +211 -0
  300. package/src/window/GlobalWindow.ts +0 -2
  301. package/src/window/INodeJSGlobal.ts +70 -0
  302. package/src/window/IWindow.ts +32 -10
  303. package/src/window/Window.ts +43 -21
  304. package/src/xml-http-request/XMLHttpRequest.ts +27 -26
  305. package/src/xml-parser/XMLParser.ts +1 -1
  306. package/lib/fetch/FetchHandler.d.ts +0 -18
  307. package/lib/fetch/FetchHandler.js +0 -83
  308. package/lib/fetch/FetchHandler.js.map +0 -1
  309. package/lib/fetch/IAbortSignal.d.ts +0 -16
  310. package/lib/fetch/IAbortSignal.js +0 -4
  311. package/lib/fetch/IAbortSignal.js.map +0 -1
  312. package/lib/fetch/IBody.d.ts +0 -17
  313. package/lib/fetch/IBody.js.map +0 -1
  314. package/lib/fetch/IHeaders.d.ts +0 -18
  315. package/lib/fetch/IHeadersInit.js.map +0 -1
  316. package/lib/fetch/IRequest.d.ts +0 -18
  317. package/lib/fetch/IRequestInit.d.ts +0 -16
  318. package/lib/fetch/IRequestInit.js.map +0 -1
  319. package/lib/fetch/IResponse.d.ts +0 -20
  320. package/lib/fetch/IResponseInit.d.ts +0 -9
  321. package/lib/fetch/IResponseInit.js.map +0 -1
  322. package/lib/fetch/RequestInfo.js +0 -3
  323. package/lib/fetch/RequestInfo.js.map +0 -1
  324. package/lib/fetch/ResourceFetchHandler.js.map +0 -1
  325. package/lib/form-data/IFormData.d.ts +0 -32
  326. package/lib/form-data/IFormData.js +0 -3
  327. package/lib/form-data/IFormData.js.map +0 -1
  328. package/lib/location/RelativeURL.d.ts +0 -15
  329. package/lib/location/RelativeURL.js +0 -19
  330. package/lib/location/RelativeURL.js.map +0 -1
  331. package/lib/nodes/element/HTMLCollectionFactory.d.ts +0 -21
  332. package/lib/nodes/element/HTMLCollectionFactory.js +0 -31
  333. package/lib/nodes/element/HTMLCollectionFactory.js.map +0 -1
  334. package/lib/nodes/html-option-element/IHTMLOptionsCollection.js.map +0 -1
  335. package/lib/nodes/node/NodeListFactory.d.ts +0 -21
  336. package/lib/nodes/node/NodeListFactory.js +0 -31
  337. package/lib/nodes/node/NodeListFactory.js.map +0 -1
  338. package/lib/nodes/validity-state/ValidityState.d.ts +0 -52
  339. package/lib/nodes/validity-state/ValidityState.js +0 -81
  340. package/lib/nodes/validity-state/ValidityState.js.map +0 -1
  341. package/src/fetch/FetchHandler.ts +0 -90
  342. package/src/fetch/IAbortSignal.ts +0 -34
  343. package/src/fetch/IBody.ts +0 -18
  344. package/src/fetch/IHeaders.ts +0 -18
  345. package/src/fetch/IRequest.ts +0 -59
  346. package/src/fetch/IRequestInit.ts +0 -41
  347. package/src/fetch/IResponse.ts +0 -22
  348. package/src/fetch/IResponseInit.ts +0 -10
  349. package/src/fetch/RequestInfo.ts +0 -6
  350. package/src/form-data/IFormData.ts +0 -33
  351. package/src/location/RelativeURL.ts +0 -17
  352. package/src/nodes/element/HTMLCollectionFactory.ts +0 -31
  353. package/src/nodes/node/NodeListFactory.ts +0 -31
  354. package/src/nodes/validity-state/ValidityState.ts +0 -84
  355. /package/lib/fetch/{IHeaders.js → types/IHeaders.js} +0 -0
  356. /package/lib/fetch/{IHeadersInit.d.ts → types/IHeadersInit.d.ts} +0 -0
  357. /package/lib/fetch/{IHeadersInit.js → types/IHeadersInit.js} +0 -0
  358. /package/lib/fetch/{IRequest.js → types/IRequest.js} +0 -0
  359. /package/lib/fetch/{IRequestInit.js → types/IRequestInit.js} +0 -0
  360. /package/lib/fetch/{IResponse.js → types/IResponse.js} +0 -0
  361. /package/lib/fetch/{IResponseInit.js → types/IResponseInit.js} +0 -0
  362. /package/lib/nodes/{html-option-element → html-select-element}/HTMLOptionsCollection.js +0 -0
  363. /package/lib/nodes/{html-option-element → html-select-element}/IHTMLOptionsCollection.js +0 -0
  364. /package/src/fetch/{IHeadersInit.ts → types/IHeadersInit.ts} +0 -0
@@ -0,0 +1,171 @@
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 HTMLInputElement_1 = __importDefault(require("../nodes/html-input-element/HTMLInputElement"));
7
+ const HTMLTextAreaElement_1 = __importDefault(require("../nodes/html-text-area-element/HTMLTextAreaElement"));
8
+ const EMAIL_REGEXP = /^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/;
9
+ const URL_REGEXP = /^(?:(?:https?|HTTPS?|ftp|FTP):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-zA-Z\u00a1-\uffff0-9]-*)*[a-zA-Z\u00a1-\uffff0-9]+)(?:\.(?:[a-zA-Z\u00a1-\uffff0-9]-*)*[a-zA-Z\u00a1-\uffff0-9]+)*)(?::\d{2,5})?(?:[\/?#]\S*)?$/;
10
+ /**
11
+ * Input validity state.
12
+ *
13
+ * Based on:
14
+ * https://github.com/cferdinandi/validate/blob/master/src/js/_validityState.polyfill.js
15
+ *
16
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/ValidityState
17
+ */
18
+ class ValidityState {
19
+ /**
20
+ * Constructor.
21
+ *
22
+ * @param element Input element.
23
+ */
24
+ constructor(element) {
25
+ this.element = element;
26
+ }
27
+ /**
28
+ * Returns validity.
29
+ *
30
+ * @returns "true" if valid.
31
+ */
32
+ get badInput() {
33
+ return (this.element instanceof HTMLInputElement_1.default &&
34
+ (this.element.type === 'number' || this.element.type === 'range') &&
35
+ this.element.value.length > 0 &&
36
+ !/^[-+]?(?:\d+|\d*[.,]\d+)$/.test(this.element.value));
37
+ }
38
+ /**
39
+ * Returns validity.
40
+ *
41
+ * @returns "true" if valid.
42
+ */
43
+ get customError() {
44
+ return this.element.validationMessage.length > 0;
45
+ }
46
+ /**
47
+ * Returns validity.
48
+ *
49
+ * @returns "true" if valid.
50
+ */
51
+ get patternMismatch() {
52
+ return (this.element instanceof HTMLInputElement_1.default &&
53
+ this.element.hasAttribute('pattern') &&
54
+ this.element.value.length > 0 &&
55
+ this.element.value.replace(new RegExp(this.element.getAttribute('pattern')), '').length > 0);
56
+ }
57
+ /**
58
+ * Returns validity.
59
+ *
60
+ * @returns "true" if valid.
61
+ */
62
+ get rangeOverflow() {
63
+ return (this.element instanceof HTMLInputElement_1.default &&
64
+ this.element.hasAttribute('max') &&
65
+ (this.element.type === 'number' || this.element.type === 'range') &&
66
+ this.element.value.length > 0 &&
67
+ Number(this.element.value) > Number(this.element.getAttribute('max')));
68
+ }
69
+ /**
70
+ * Returns validity.
71
+ *
72
+ * @returns "true" if valid.
73
+ */
74
+ get rangeUnderflow() {
75
+ return (this.element instanceof HTMLInputElement_1.default &&
76
+ this.element.hasAttribute('min') &&
77
+ (this.element.type === 'number' || this.element.type === 'range') &&
78
+ this.element.value.length > 0 &&
79
+ Number(this.element.value) < Number(this.element.getAttribute('min')));
80
+ }
81
+ /**
82
+ * Returns validity.
83
+ *
84
+ * @returns "true" if valid.
85
+ */
86
+ get stepMismatch() {
87
+ return (this.element instanceof HTMLInputElement_1.default &&
88
+ (this.element.type === 'number' || this.element.type === 'range') &&
89
+ ((this.element.hasAttribute('step') &&
90
+ this.element.getAttribute('step') !== 'any' &&
91
+ Number(this.element.value) % Number(this.element.getAttribute('step')) !== 0) ||
92
+ (!this.element.hasAttribute('step') && Number(this.element.value) % 1 !== 0)));
93
+ }
94
+ /**
95
+ * Returns validity.
96
+ *
97
+ * @returns "true" if valid.
98
+ */
99
+ get tooLong() {
100
+ return ((this.element instanceof HTMLInputElement_1.default || this.element instanceof HTMLTextAreaElement_1.default) &&
101
+ this.element.maxLength > 0 &&
102
+ this.element.value.length > this.element.maxLength);
103
+ }
104
+ /**
105
+ * Returns validity.
106
+ *
107
+ * @returns "true" if valid.
108
+ */
109
+ get tooShort() {
110
+ return ((this.element instanceof HTMLInputElement_1.default || this.element instanceof HTMLTextAreaElement_1.default) &&
111
+ this.element.minLength > 0 &&
112
+ this.element.value.length > 0 &&
113
+ this.element.value.length < this.element.minLength);
114
+ }
115
+ /**
116
+ * Returns validity.
117
+ *
118
+ * @returns "true" if valid.
119
+ */
120
+ get typeMismatch() {
121
+ return (this.element instanceof HTMLInputElement_1.default &&
122
+ this.element.value.length > 0 &&
123
+ ((this.element.type === 'email' && !EMAIL_REGEXP.test(this.element.value)) ||
124
+ (this.element.type === 'url' && !URL_REGEXP.test(this.element.value))));
125
+ }
126
+ /**
127
+ * Returns validity.
128
+ *
129
+ * @returns "true" if valid.
130
+ */
131
+ get valueMissing() {
132
+ if (!this.element.required) {
133
+ return false;
134
+ }
135
+ if (this.element instanceof HTMLInputElement_1.default) {
136
+ if (this.element.type === 'checkbox') {
137
+ return !this.element.checked;
138
+ }
139
+ else if (this.element.type === 'radio') {
140
+ if (this.element.checked) {
141
+ return false;
142
+ }
143
+ if (!this.element.name) {
144
+ return true;
145
+ }
146
+ const root = this.element._formNode || this.element.getRootNode();
147
+ return !root || !root.querySelector(`input[name="${this.element.name}"]:checked`);
148
+ }
149
+ }
150
+ return this.element.value.length === 0;
151
+ }
152
+ /**
153
+ * Returns validity.
154
+ *
155
+ * @returns "true" if valid.
156
+ */
157
+ get valid() {
158
+ return (!this.badInput &&
159
+ !this.customError &&
160
+ !this.patternMismatch &&
161
+ !this.rangeOverflow &&
162
+ !this.rangeUnderflow &&
163
+ !this.stepMismatch &&
164
+ !this.tooLong &&
165
+ !this.tooShort &&
166
+ !this.typeMismatch &&
167
+ !this.valueMissing);
168
+ }
169
+ }
170
+ exports.default = ValidityState;
171
+ //# sourceMappingURL=ValidityState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ValidityState.js","sourceRoot":"","sources":["../../src/validity-state/ValidityState.ts"],"names":[],"mappings":";;;;;AAEA,oGAA4E;AAG5E,8GAAsF;AAItF,MAAM,YAAY,GACjB,ggBAAggB,CAAC;AAClgB,MAAM,UAAU,GACf,0bAA0b,CAAC;AAE5b;;;;;;;GAOG;AACH,MAAqB,aAAa;IAOjC;;;;OAIG;IACH,YACC,O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CAAC,OAAO,YAAY,0BAAgB,EAAE;YAC7C,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE;gBACrC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;aAC7B;iBAAM,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,OAAO,EAAE;gBACzC,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;oBACzB,OAAO,KAAK,CAAC;iBACb;gBACD,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;oBACvB,OAAO,IAAI,CAAC;iBACZ;gBACD,MAAM,IAAI,GACS,IAAI,CAAC,OAAO,CAAC,SAAS,IAAiB,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;gBACrF,OAAO,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,eAAe,IAAI,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,CAAC;aAClF;SACD;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IACxC,CAAC;IAED;;;;OAIG;IACH,IAAW,KAAK;QACf,OAAO,CACN,CAAC,IAAI,CAAC,QAAQ;YACd,CAAC,IAAI,CAAC,WAAW;YACjB,CAAC,IAAI,CAAC,eAAe;YACrB,CAAC,IAAI,CAAC,aAAa;YACnB,CAAC,IAAI,CAAC,cAAc;YACpB,CAAC,IAAI,CAAC,YAAY;YAClB,CAAC,IAAI,CAAC,OAAO;YACb,CAAC,IAAI,CAAC,QAAQ;YACd,CAAC,IAAI,CAAC,YAAY;YAClB,CAAC,IAAI,CAAC,YAAY,CAClB,CAAC;IACH,CAAC;CACD;AA5LD,gCA4LC"}
@@ -65,14 +65,6 @@ export default class GlobalWindow extends Window {
65
65
  unescape: typeof unescape;
66
66
  gc: any;
67
67
  v8debug: any;
68
- AbortController: {
69
- new (): AbortController;
70
- prototype: AbortController;
71
- };
72
- AbortSignal: {
73
- new (): AbortSignal;
74
- prototype: AbortSignal;
75
- };
76
68
  Array: ArrayConstructor;
77
69
  Object: ObjectConstructor;
78
70
  Function: FunctionConstructor;
@@ -70,8 +70,6 @@ class GlobalWindow extends Window_1.default {
70
70
  this.unescape = globalThis.unescape;
71
71
  this.gc = globalThis.gc;
72
72
  this.v8debug = globalThis.v8debug;
73
- this.AbortController = globalThis.AbortController;
74
- this.AbortSignal = globalThis.AbortSignal;
75
73
  this.Array = globalThis.Array;
76
74
  this.Object = globalThis.Object;
77
75
  this.Function = globalThis.Function;
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalWindow.js","sourceRoot":"","sources":["../../src/window/GlobalWindow.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAE9B;;;;;GAKG;AACH,MAAqB,YAAa,SAAQ,gBAAM;IAAhD;;QACC,kBAAkB;QACX,gBAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QACrC,YAAO,GAAG,UAAU,CAAC,OAAO,CAAC;QAC7B,WAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;QAC/D,aAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;QAC/B,SAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QACvB,UAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QACzB,cAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACjC,iBAAY,GAAG,UAAU,CAAC,YAAY,CAAC;QACvC,iBAAY,GAAG,UAAU,CAAC,YAAY,CAAC;QACvC,WAAM,GAAG,UAAU,CAAC,MAAM,CAAC;QAC3B,aAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;QAC/B,eAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACnC,eAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACnC,cAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACjC,SAAI,GAAG,UAAU,C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AAU,CAAC,MAAM,CAAC;QAC3B,aAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;IAoBvC,CAAC;IAlBA;;;;;OAKG;IACI,IAAI,CAAC,IAAY;QACvB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACO,eAAe;QACxB,aAAa;IACd,CAAC;CACD;AAhFD,+BAgFC"}
@@ -0,0 +1,71 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
4
+ interface INodeJSGlobal {
5
+ Array: typeof Array;
6
+ ArrayBuffer: typeof ArrayBuffer;
7
+ Boolean: typeof Boolean;
8
+ Buffer: typeof Buffer;
9
+ DataView: typeof DataView;
10
+ Date: typeof Date;
11
+ Error: typeof Error;
12
+ EvalError: typeof EvalError;
13
+ Float32Array: typeof Float32Array;
14
+ Float64Array: typeof Float64Array;
15
+ Function: typeof Function;
16
+ Infinity: typeof Infinity;
17
+ Int16Array: typeof Int16Array;
18
+ Int32Array: typeof Int32Array;
19
+ Int8Array: typeof Int8Array;
20
+ Intl: typeof Intl;
21
+ JSON: typeof JSON;
22
+ Map: MapConstructor;
23
+ Math: typeof Math;
24
+ NaN: typeof NaN;
25
+ Number: typeof Number;
26
+ Object: typeof Object;
27
+ Promise: typeof Promise;
28
+ RangeError: typeof RangeError;
29
+ ReferenceError: typeof ReferenceError;
30
+ RegExp: typeof RegExp;
31
+ Set: SetConstructor;
32
+ String: typeof String;
33
+ Symbol: Function;
34
+ SyntaxError: typeof SyntaxError;
35
+ TypeError: typeof TypeError;
36
+ URIError: typeof URIError;
37
+ Uint16Array: typeof Uint16Array;
38
+ Uint32Array: typeof Uint32Array;
39
+ Uint8Array: typeof Uint8Array;
40
+ Uint8ClampedArray: typeof Uint8ClampedArray;
41
+ WeakMap: WeakMapConstructor;
42
+ WeakSet: WeakSetConstructor;
43
+ clearImmediate: (immediateId: NodeJS.Immediate) => void;
44
+ clearInterval: (intervalId: NodeJS.Timeout) => void;
45
+ clearTimeout: (timeoutId: NodeJS.Timeout) => void;
46
+ decodeURI: typeof decodeURI;
47
+ decodeURIComponent: typeof decodeURIComponent;
48
+ encodeURI: typeof encodeURI;
49
+ encodeURIComponent: typeof encodeURIComponent;
50
+ /**
51
+ * @deprecated
52
+ */
53
+ escape: (str: string) => string;
54
+ eval: typeof eval;
55
+ global: NodeJS.Global;
56
+ isFinite: typeof isFinite;
57
+ isNaN: typeof isNaN;
58
+ parseFloat: typeof parseFloat;
59
+ parseInt: typeof parseInt;
60
+ setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => NodeJS.Immediate;
61
+ setInterval: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => NodeJS.Timeout;
62
+ setTimeout: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => NodeJS.Timeout;
63
+ queueMicrotask: typeof queueMicrotask;
64
+ undefined: typeof undefined;
65
+ /**
66
+ * @deprecated
67
+ */
68
+ unescape: (str: string) => string;
69
+ gc: () => void;
70
+ v8debug?: any;
71
+ }
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ //# sourceMappingURL=INodeJSGlobal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"INodeJSGlobal.js","sourceRoot":"","sources":["../../src/window/INodeJSGlobal.ts"],"names":[],"mappings":"AAAA,uDAAuD"}
@@ -68,6 +68,7 @@ import CSSKeyframeRule from '../css/rules/CSSKeyframeRule';
68
68
  import CSSKeyframesRule from '../css/rules/CSSKeyframesRule';
69
69
  import CSSMediaRule from '../css/rules/CSSMediaRule';
70
70
  import CSSStyleRule from '../css/rules/CSSStyleRule';
71
+ import CSSSupportsRule from '../css/rules/CSSSupportsRule';
71
72
  import PointerEvent from '../event/events/PointerEvent';
72
73
  import MouseEvent from '../event/events/MouseEvent';
73
74
  import FocusEvent from '../event/events/FocusEvent';
@@ -86,6 +87,7 @@ import AsyncTaskManager from '../async-task-manager/AsyncTaskManager';
86
87
  import Storage from '../storage/Storage';
87
88
  import NodeFilter from '../tree-walker/NodeFilter';
88
89
  import HTMLCollection from '../nodes/element/HTMLCollection';
90
+ import HTMLFormControlsCollection from '../nodes/html-form-element/HTMLFormControlsCollection';
89
91
  import NodeList from '../nodes/node/NodeList';
90
92
  import Selection from '../selection/Selection';
91
93
  import IEventTarget from '../event/IEventTarget';
@@ -94,11 +96,11 @@ import MimeType from '../navigator/MimeType';
94
96
  import MimeTypeArray from '../navigator/MimeTypeArray';
95
97
  import Plugin from '../navigator/Plugin';
96
98
  import PluginArray from '../navigator/PluginArray';
97
- import IResponseInit from '../fetch/IResponseInit';
98
- import IRequest from '../fetch/IRequest';
99
- import IHeaders from '../fetch/IHeaders';
100
- import IRequestInit from '../fetch/IRequestInit';
101
- import IResponse from '../fetch/IResponse';
99
+ import IResponseInit from '../fetch/types/IResponseInit';
100
+ import IRequest from '../fetch/types/IRequest';
101
+ import IHeaders from '../fetch/types/IHeaders';
102
+ import IRequestInit from '../fetch/types/IRequestInit';
103
+ import IResponse from '../fetch/types/IResponse';
102
104
  import Range from '../range/Range';
103
105
  import MediaQueryList from '../match-media/MediaQueryList';
104
106
  import XMLHttpRequest from '../xml-http-request/XMLHttpRequest';
@@ -112,12 +114,21 @@ import { Performance } from 'perf_hooks';
112
114
  import IElement from '../nodes/element/IElement';
113
115
  import ProcessingInstruction from '../nodes/processing-instruction/ProcessingInstruction';
114
116
  import IHappyDOMSettings from './IHappyDOMSettings';
115
- import RequestInfo from '../fetch/RequestInfo';
117
+ import RequestInfo from '../fetch/types/IRequestInfo';
116
118
  import FileList from '../nodes/html-input-element/FileList';
119
+ import Stream from 'stream';
120
+ import FormData from '../form-data/FormData';
121
+ import AbortController from '../fetch/AbortController';
122
+ import AbortSignal from '../fetch/AbortSignal';
123
+ import IResponseBody from '../fetch/types/IResponseBody';
124
+ import IRequestInfo from '../fetch/types/IRequestInfo';
125
+ import IHeadersInit from '../fetch/types/IHeadersInit';
126
+ import RadioNodeList from '../nodes/html-form-element/RadioNodeList';
127
+ import ValidityState from '../validity-state/ValidityState';
117
128
  /**
118
129
  * Window without dependencies to server side specific packages.
119
130
  */
120
- export default interface IWindow extends IEventTarget, NodeJS.Global {
131
+ export default interface IWindow extends IEventTarget, INodeJSGlobal {
121
132
  readonly happyDOM: {
122
133
  whenAsyncComplete: () => Promise<void>;
123
134
  cancelAsync: () => void;
@@ -204,6 +215,7 @@ export default interface IWindow extends IEventTarget, NodeJS.Global {
204
215
  readonly Screen: typeof Screen;
205
216
  readonly Storage: typeof Storage;
206
217
  readonly HTMLCollection: typeof HTMLCollection;
218
+ readonly HTMLFormControlsCollection: typeof HTMLFormControlsCollection;
207
219
  readonly NodeList: typeof NodeList;
208
220
  readonly CSSUnitValue: typeof CSSUnitValue;
209
221
  readonly CSS: CSS;
@@ -214,6 +226,7 @@ export default interface IWindow extends IEventTarget, NodeJS.Global {
214
226
  readonly CSSKeyframesRule: typeof CSSKeyframesRule;
215
227
  readonly CSSMediaRule: typeof CSSMediaRule;
216
228
  readonly CSSStyleRule: typeof CSSStyleRule;
229
+ readonly CSSSupportsRule: typeof CSSSupportsRule;
217
230
  readonly Selection: typeof Selection;
218
231
  readonly Navigator: typeof Navigator;
219
232
  readonly MimeType: typeof MimeType;
@@ -221,13 +234,13 @@ export default interface IWindow extends IEventTarget, NodeJS.Global {
221
234
  readonly Plugin: typeof Plugin;
222
235
  readonly PluginArray: typeof PluginArray;
223
236
  readonly Headers: {
224
- new (init?: string[][] | Record<string, string> | IHeaders): IHeaders;
237
+ new (init?: IHeadersInit): IHeaders;
225
238
  };
226
239
  readonly Request: {
227
- new (input: string | IRequest, init?: IRequestInit): IRequest;
240
+ new (input: IRequestInfo, init?: IRequestInit): IRequest;
228
241
  };
229
242
  readonly Response: {
230
- new (body?: unknown | null, init?: IResponseInit): IResponse;
243
+ new (body?: IResponseBody | null, init?: IResponseInit): IResponse;
231
244
  };
232
245
  readonly Range: typeof Range;
233
246
  readonly DOMRect: typeof DOMRect;
@@ -235,6 +248,13 @@ export default interface IWindow extends IEventTarget, NodeJS.Global {
235
248
  readonly XMLHttpRequestUpload: typeof XMLHttpRequestUpload;
236
249
  readonly XMLHttpRequestEventTarget: typeof XMLHttpRequestEventTarget;
237
250
  readonly FileList: typeof FileList;
251
+ readonly ReadableStream: typeof Stream.Readable;
252
+ readonly WritableStream: typeof Stream.Writable;
253
+ readonly FormData: typeof FormData;
254
+ readonly AbortController: typeof AbortController;
255
+ readonly AbortSignal: typeof AbortSignal;
256
+ readonly RadioNodeList: typeof RadioNodeList;
257
+ readonly ValidityState: typeof ValidityState;
238
258
  onload: (event: Event) => void;
239
259
  onerror: (event: ErrorEvent) => void;
240
260
  readonly document: Document;
@@ -2,6 +2,7 @@
2
2
  /// <reference types="node" />
3
3
  /// <reference types="node" />
4
4
  /// <reference types="node" />
5
+ /// <reference types="node" />
5
6
  import CustomElementRegistry from '../custom-element/CustomElementRegistry';
6
7
  import Document from '../nodes/document/Document';
7
8
  import HTMLDocument from '../nodes/html-document/HTMLDocument';
@@ -67,6 +68,7 @@ import CSSKeyframeRule from '../css/rules/CSSKeyframeRule';
67
68
  import CSSKeyframesRule from '../css/rules/CSSKeyframesRule';
68
69
  import CSSMediaRule from '../css/rules/CSSMediaRule';
69
70
  import CSSStyleRule from '../css/rules/CSSStyleRule';
71
+ import CSSSupportsRule from '../css/rules/CSSSupportsRule';
70
72
  import MouseEvent from '../event/events/MouseEvent';
71
73
  import PointerEvent from '../event/events/PointerEvent';
72
74
  import FocusEvent from '../event/events/FocusEvent';
@@ -80,15 +82,16 @@ import ErrorEvent from '../event/events/ErrorEvent';
80
82
  import StorageEvent from '../event/events/StorageEvent';
81
83
  import Screen from '../screen/Screen';
82
84
  import AsyncTaskManager from '../async-task-manager/AsyncTaskManager';
83
- import IResponse from '../fetch/IResponse';
84
- import IResponseInit from '../fetch/IResponseInit';
85
- import IRequest from '../fetch/IRequest';
86
- import IRequestInit from '../fetch/IRequestInit';
87
- import IHeaders from '../fetch/IHeaders';
88
- import IHeadersInit from '../fetch/IHeadersInit';
85
+ import IResponse from '../fetch/types/IResponse';
86
+ import IResponseInit from '../fetch/types/IResponseInit';
87
+ import IRequest from '../fetch/types/IRequest';
88
+ import IRequestInit from '../fetch/types/IRequestInit';
89
+ import IHeaders from '../fetch/types/IHeaders';
90
+ import IHeadersInit from '../fetch/types/IHeadersInit';
89
91
  import Storage from '../storage/Storage';
90
92
  import IWindow from './IWindow';
91
93
  import HTMLCollection from '../nodes/element/HTMLCollection';
94
+ import HTMLFormControlsCollection from '../nodes/html-form-element/HTMLFormControlsCollection';
92
95
  import NodeList from '../nodes/node/NodeList';
93
96
  import MediaQueryList from '../match-media/MediaQueryList';
94
97
  import Selection from '../selection/Selection';
@@ -105,9 +108,17 @@ import Attr from '../nodes/attr/Attr';
105
108
  import NamedNodeMap from '../named-node-map/NamedNodeMap';
106
109
  import IElement from '../nodes/element/IElement';
107
110
  import ProcessingInstruction from '../nodes/processing-instruction/ProcessingInstruction';
108
- import RequestInfo from '../fetch/RequestInfo';
111
+ import RequestInfo from '../fetch/types/IRequestInfo';
109
112
  import FileList from '../nodes/html-input-element/FileList';
113
+ import Stream from 'stream';
114
+ import FormData from '../form-data/FormData';
115
+ import AbortController from '../fetch/AbortController';
116
+ import AbortSignal from '../fetch/AbortSignal';
117
+ import IResponseBody from '../fetch/types/IResponseBody';
118
+ import IRequestInfo from '../fetch/types/IRequestInfo';
110
119
  import IHappyDOMOptions from './IHappyDOMOptions';
120
+ import RadioNodeList from '../nodes/html-form-element/RadioNodeList';
121
+ import ValidityState from '../validity-state/ValidityState';
111
122
  /**
112
123
  * Browser window.
113
124
  *
@@ -222,6 +233,7 @@ export default class Window extends EventTarget implements IWindow {
222
233
  readonly Storage: typeof Storage;
223
234
  readonly URLSearchParams: typeof URLSearchParams;
224
235
  readonly HTMLCollection: typeof HTMLCollection;
236
+ readonly HTMLFormControlsCollection: typeof HTMLFormControlsCollection;
225
237
  readonly NodeList: typeof NodeList;
226
238
  readonly CSSUnitValue: typeof CSSUnitValue;
227
239
  readonly CSSRule: typeof CSSRule;
@@ -231,6 +243,7 @@ export default class Window extends EventTarget implements IWindow {
231
243
  readonly CSSKeyframesRule: typeof CSSKeyframesRule;
232
244
  readonly CSSMediaRule: typeof CSSMediaRule;
233
245
  readonly CSSStyleRule: typeof CSSStyleRule;
246
+ readonly CSSSupportsRule: typeof CSSSupportsRule;
234
247
  readonly Selection: typeof Selection;
235
248
  readonly Navigator: typeof Navigator;
236
249
  readonly MimeType: typeof MimeType;
@@ -242,21 +255,28 @@ export default class Window extends EventTarget implements IWindow {
242
255
  new (init?: IHeadersInit): IHeaders;
243
256
  };
244
257
  readonly DOMRect: typeof DOMRect;
258
+ readonly RadioNodeList: typeof RadioNodeList;
259
+ readonly ValidityState: typeof ValidityState;
245
260
  readonly Request: {
246
- new (input: string | {
247
- href: string;
248
- } | IRequest, init?: IRequestInit): IRequest;
261
+ new (input: IRequestInfo, init?: IRequestInit): IRequest;
249
262
  };
250
263
  readonly Response: {
251
- new (body?: NodeJS.ReadableStream | null, init?: IResponseInit): IResponse;
264
+ new (body?: IResponseBody, init?: IResponseInit): IResponse;
252
265
  };
253
266
  readonly XMLHttpRequestUpload: typeof XMLHttpRequestUpload;
254
267
  readonly XMLHttpRequestEventTarget: typeof XMLHttpRequestEventTarget;
268
+ readonly ReadableStream: typeof Stream.Readable;
269
+ readonly WritableStream: typeof Stream.Writable;
270
+ readonly TransformStream: typeof Stream.Transform;
271
+ readonly AbortController: typeof AbortController;
272
+ readonly AbortSignal: typeof AbortSignal;
273
+ readonly FormData: typeof FormData;
255
274
  readonly XMLHttpRequest: any;
256
275
  readonly DOMParser: any;
257
276
  readonly Range: any;
258
277
  readonly FileReader: any;
259
278
  readonly Image: any;
279
+ readonly Audio: any;
260
280
  onload: (event: Event) => void;
261
281
  onerror: (event: ErrorEvent) => void;
262
282
  readonly document: Document;
@@ -319,6 +339,9 @@ export default class Window extends EventTarget implements IWindow {
319
339
  decodeURIComponent: any;
320
340
  encodeURI: any;
321
341
  encodeURIComponent: any;
342
+ /**
343
+ * @deprecated
344
+ */
322
345
  escape: any;
323
346
  global: any;
324
347
  isFinite: any;
@@ -330,11 +353,12 @@ export default class Window extends EventTarget implements IWindow {
330
353
  setImmediate: any;
331
354
  queueMicrotask: any;
332
355
  undefined: any;
356
+ /**
357
+ * @deprecated
358
+ */
333
359
  unescape: any;
334
360
  gc: any;
335
361
  v8debug: any;
336
- AbortController: any;
337
- AbortSignal: any;
338
362
  Array: any;
339
363
  Object: any;
340
364
  Function: any;
@@ -435,7 +459,6 @@ export default class Window extends EventTarget implements IWindow {
435
459
  /**
436
460
  * Sets a timer which executes a function once the timer expires.
437
461
  *
438
- * @override
439
462
  * @param callback Function to be executed.
440
463
  * @param [delay=0] Delay in ms.
441
464
  * @param args Arguments passed to the callback function.
@@ -445,14 +468,12 @@ export default class Window extends EventTarget implements IWindow {
445
468
  /**
446
469
  * Cancels a timeout previously established by calling setTimeout().
447
470
  *
448
- * @override
449
471
  * @param id ID of the timeout.
450
472
  */
451
473
  clearTimeout(id: NodeJS.Timeout): void;
452
474
  /**
453
475
  * Calls a function with a fixed time delay between each call.
454
476
  *
455
- * @override
456
477
  * @param callback Function to be executed.
457
478
  * @param [delay=0] Delay in ms.
458
479
  * @param args Arguments passed to the callback function.
@@ -462,14 +483,12 @@ export default class Window extends EventTarget implements IWindow {
462
483
  /**
463
484
  * Cancels a timed repeating action which was previously established by a call to setInterval().
464
485
  *
465
- * @override
466
486
  * @param id ID of the interval.
467
487
  */
468
488
  clearInterval(id: NodeJS.Timeout): void;
469
489
  /**
470
490
  * Mock animation frames with timeouts.
471
491
  *
472
- * @override
473
492
  * @param callback Callback.
474
493
  * @returns Timeout ID.
475
494
  */
@@ -477,14 +496,12 @@ export default class Window extends EventTarget implements IWindow {
477
496
  /**
478
497
  * Mock animation frames with timeouts.
479
498
  *
480
- * @override
481
499
  * @param id Timeout ID.
482
500
  */
483
501
  cancelAnimationFrame(id: NodeJS.Timeout): void;
484
502
  /**
485
503
  * This method provides an easy, logical way to fetch resources asynchronously across the network.
486
504
  *
487
- * @override
488
505
  * @param url URL.
489
506
  * @param [init] Init.
490
507
  * @returns Promise.