happy-dom 16.5.1 → 16.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) hide show
  1. package/cjs/PropertySymbol.cjs +2 -1
  2. package/cjs/PropertySymbol.cjs.map +1 -1
  3. package/cjs/PropertySymbol.d.ts +1 -0
  4. package/cjs/PropertySymbol.d.ts.map +1 -1
  5. package/cjs/async-task-manager/AsyncTaskManager.cjs.map +1 -1
  6. package/cjs/async-task-manager/AsyncTaskManager.d.ts.map +1 -1
  7. package/cjs/browser/detached-browser/DetachedBrowser.cjs.map +1 -1
  8. package/cjs/browser/utilities/BrowserExceptionObserver.cjs +5 -3
  9. package/cjs/browser/utilities/BrowserExceptionObserver.cjs.map +1 -1
  10. package/cjs/browser/utilities/BrowserExceptionObserver.d.ts.map +1 -1
  11. package/cjs/browser/utilities/BrowserFrameNavigator.cjs +1 -1
  12. package/cjs/browser/utilities/BrowserFrameNavigator.cjs.map +1 -1
  13. package/cjs/browser/utilities/BrowserFrameNavigator.d.ts +6 -6
  14. package/cjs/browser/utilities/BrowserFrameNavigator.d.ts.map +1 -1
  15. package/cjs/console/VirtualConsole.cjs +26 -15
  16. package/cjs/console/VirtualConsole.cjs.map +1 -1
  17. package/cjs/console/VirtualConsole.d.ts +18 -10
  18. package/cjs/console/VirtualConsole.d.ts.map +1 -1
  19. package/cjs/cookie/urilities/CookieExpireUtility.d.ts +1 -1
  20. package/cjs/cookie/urilities/CookieExpireUtility.d.ts.map +1 -1
  21. package/cjs/css/declaration/property-manager/CSSStyleDeclarationPropertyGetParser.d.ts +17 -17
  22. package/cjs/css/declaration/property-manager/CSSStyleDeclarationPropertyGetParser.d.ts.map +1 -1
  23. package/cjs/event/Event.cjs +1 -0
  24. package/cjs/event/Event.cjs.map +1 -1
  25. package/cjs/event/Event.d.ts +1 -0
  26. package/cjs/event/Event.d.ts.map +1 -1
  27. package/cjs/event/EventTarget.cjs +5 -4
  28. package/cjs/event/EventTarget.cjs.map +1 -1
  29. package/cjs/event/EventTarget.d.ts.map +1 -1
  30. package/cjs/fetch/Fetch.cjs.map +1 -1
  31. package/cjs/fetch/Fetch.d.ts.map +1 -1
  32. package/cjs/html-parser/HTMLParser.cjs +1 -1
  33. package/cjs/html-parser/HTMLParser.cjs.map +1 -1
  34. package/cjs/html-serializer/HTMLSerializer.cjs +2 -2
  35. package/cjs/html-serializer/HTMLSerializer.cjs.map +1 -1
  36. package/cjs/nodes/element/Element.cjs.map +1 -1
  37. package/cjs/nodes/element/Element.d.ts +34 -34
  38. package/cjs/nodes/element/Element.d.ts.map +1 -1
  39. package/cjs/nodes/html-body-element/HTMLBodyElement.cjs.map +1 -1
  40. package/cjs/nodes/html-body-element/HTMLBodyElement.d.ts +18 -18
  41. package/cjs/nodes/html-body-element/HTMLBodyElement.d.ts.map +1 -1
  42. package/cjs/nodes/html-canvas-element/HTMLCanvasElement.cjs.map +1 -1
  43. package/cjs/nodes/html-canvas-element/HTMLCanvasElement.d.ts +5 -5
  44. package/cjs/nodes/html-canvas-element/HTMLCanvasElement.d.ts.map +1 -1
  45. package/cjs/nodes/html-details-element/HTMLDetailsElement.cjs.map +1 -1
  46. package/cjs/nodes/html-details-element/HTMLDetailsElement.d.ts +1 -1
  47. package/cjs/nodes/html-details-element/HTMLDetailsElement.d.ts.map +1 -1
  48. package/cjs/nodes/html-dialog-element/HTMLDialogElement.cjs.map +1 -1
  49. package/cjs/nodes/html-dialog-element/HTMLDialogElement.d.ts +2 -2
  50. package/cjs/nodes/html-dialog-element/HTMLDialogElement.d.ts.map +1 -1
  51. package/cjs/nodes/html-element/HTMLElement.cjs.map +1 -1
  52. package/cjs/nodes/html-element/HTMLElement.d.ts +25 -25
  53. package/cjs/nodes/html-element/HTMLElement.d.ts.map +1 -1
  54. package/cjs/nodes/html-form-element/HTMLFormElement.cjs.map +1 -1
  55. package/cjs/nodes/html-form-element/HTMLFormElement.d.ts +3 -3
  56. package/cjs/nodes/html-form-element/HTMLFormElement.d.ts.map +1 -1
  57. package/cjs/nodes/html-iframe-element/HTMLIFrameElement.cjs.map +1 -1
  58. package/cjs/nodes/html-iframe-element/HTMLIFrameElement.d.ts +2 -2
  59. package/cjs/nodes/html-iframe-element/HTMLIFrameElement.d.ts.map +1 -1
  60. package/cjs/nodes/html-input-element/HTMLInputElement.cjs.map +1 -1
  61. package/cjs/nodes/html-input-element/HTMLInputElement.d.ts +3 -3
  62. package/cjs/nodes/html-input-element/HTMLInputElement.d.ts.map +1 -1
  63. package/cjs/nodes/html-media-element/HTMLMediaElement.cjs.map +1 -1
  64. package/cjs/nodes/html-media-element/HTMLMediaElement.d.ts +23 -23
  65. package/cjs/nodes/html-media-element/HTMLMediaElement.d.ts.map +1 -1
  66. package/cjs/nodes/html-media-element/MediaStream.cjs.map +1 -1
  67. package/cjs/nodes/html-media-element/MediaStream.d.ts +2 -2
  68. package/cjs/nodes/html-media-element/MediaStream.d.ts.map +1 -1
  69. package/cjs/nodes/html-media-element/MediaStreamTrack.cjs.map +1 -1
  70. package/cjs/nodes/html-media-element/MediaStreamTrack.d.ts +3 -3
  71. package/cjs/nodes/html-media-element/MediaStreamTrack.d.ts.map +1 -1
  72. package/cjs/nodes/html-select-element/HTMLSelectElement.cjs.map +1 -1
  73. package/cjs/nodes/html-select-element/HTMLSelectElement.d.ts +2 -2
  74. package/cjs/nodes/html-select-element/HTMLSelectElement.d.ts.map +1 -1
  75. package/cjs/nodes/html-slot-element/HTMLSlotElement.cjs.map +1 -1
  76. package/cjs/nodes/html-slot-element/HTMLSlotElement.d.ts +1 -1
  77. package/cjs/nodes/html-slot-element/HTMLSlotElement.d.ts.map +1 -1
  78. package/cjs/nodes/html-text-area-element/HTMLTextAreaElement.cjs.map +1 -1
  79. package/cjs/nodes/html-text-area-element/HTMLTextAreaElement.d.ts +2 -2
  80. package/cjs/nodes/html-text-area-element/HTMLTextAreaElement.d.ts.map +1 -1
  81. package/cjs/nodes/shadow-root/ShadowRoot.cjs.map +1 -1
  82. package/cjs/nodes/shadow-root/ShadowRoot.d.ts +1 -1
  83. package/cjs/nodes/shadow-root/ShadowRoot.d.ts.map +1 -1
  84. package/cjs/nodes/svg-animation-element/SVGAnimationElement.cjs.map +1 -1
  85. package/cjs/nodes/svg-animation-element/SVGAnimationElement.d.ts +3 -3
  86. package/cjs/nodes/svg-animation-element/SVGAnimationElement.d.ts.map +1 -1
  87. package/cjs/nodes/svg-element/SVGElement.cjs.map +1 -1
  88. package/cjs/nodes/svg-element/SVGElement.d.ts +6 -6
  89. package/cjs/nodes/svg-element/SVGElement.d.ts.map +1 -1
  90. package/cjs/nodes/svg-graphics-element/SVGGraphicsElement.cjs.map +1 -1
  91. package/cjs/nodes/svg-graphics-element/SVGGraphicsElement.d.ts +3 -3
  92. package/cjs/nodes/svg-graphics-element/SVGGraphicsElement.d.ts.map +1 -1
  93. package/cjs/nodes/svg-svg-element/SVGSVGElement.cjs.map +1 -1
  94. package/cjs/nodes/svg-svg-element/SVGSVGElement.d.ts +18 -18
  95. package/cjs/nodes/svg-svg-element/SVGSVGElement.d.ts.map +1 -1
  96. package/cjs/query-selector/SelectorItem.cjs +2 -1
  97. package/cjs/query-selector/SelectorItem.cjs.map +1 -1
  98. package/cjs/query-selector/SelectorItem.d.ts.map +1 -1
  99. package/cjs/svg/SVGAngle.cjs.map +1 -1
  100. package/cjs/svg/SVGAngle.d.ts +2 -2
  101. package/cjs/svg/SVGAngle.d.ts.map +1 -1
  102. package/cjs/svg/SVGAnimatedBoolean.cjs.map +1 -1
  103. package/cjs/svg/SVGAnimatedBoolean.d.ts +2 -2
  104. package/cjs/svg/SVGAnimatedBoolean.d.ts.map +1 -1
  105. package/cjs/svg/SVGAnimatedInteger.cjs.map +1 -1
  106. package/cjs/svg/SVGAnimatedInteger.d.ts +2 -2
  107. package/cjs/svg/SVGAnimatedInteger.d.ts.map +1 -1
  108. package/cjs/svg/SVGAnimatedNumber.cjs.map +1 -1
  109. package/cjs/svg/SVGAnimatedNumber.d.ts +2 -2
  110. package/cjs/svg/SVGAnimatedNumber.d.ts.map +1 -1
  111. package/cjs/svg/SVGAnimatedString.cjs.map +1 -1
  112. package/cjs/svg/SVGAnimatedString.d.ts +2 -2
  113. package/cjs/svg/SVGAnimatedString.d.ts.map +1 -1
  114. package/cjs/svg/SVGLength.cjs.map +1 -1
  115. package/cjs/svg/SVGLength.d.ts +2 -2
  116. package/cjs/svg/SVGLength.d.ts.map +1 -1
  117. package/cjs/svg/SVGLengthList.cjs.map +1 -1
  118. package/cjs/svg/SVGLengthList.d.ts +2 -2
  119. package/cjs/svg/SVGLengthList.d.ts.map +1 -1
  120. package/cjs/svg/SVGMatrix.cjs.map +1 -1
  121. package/cjs/svg/SVGMatrix.d.ts +2 -2
  122. package/cjs/svg/SVGMatrix.d.ts.map +1 -1
  123. package/cjs/svg/SVGNumber.cjs.map +1 -1
  124. package/cjs/svg/SVGNumber.d.ts +2 -2
  125. package/cjs/svg/SVGNumber.d.ts.map +1 -1
  126. package/cjs/svg/SVGNumberList.cjs.map +1 -1
  127. package/cjs/svg/SVGNumberList.d.ts +2 -2
  128. package/cjs/svg/SVGNumberList.d.ts.map +1 -1
  129. package/cjs/svg/SVGPoint.cjs.map +1 -1
  130. package/cjs/svg/SVGPoint.d.ts +2 -2
  131. package/cjs/svg/SVGPoint.d.ts.map +1 -1
  132. package/cjs/svg/SVGPointList.cjs.map +1 -1
  133. package/cjs/svg/SVGPointList.d.ts +2 -2
  134. package/cjs/svg/SVGPointList.d.ts.map +1 -1
  135. package/cjs/svg/SVGPreserveAspectRatio.cjs.map +1 -1
  136. package/cjs/svg/SVGPreserveAspectRatio.d.ts +2 -2
  137. package/cjs/svg/SVGPreserveAspectRatio.d.ts.map +1 -1
  138. package/cjs/svg/SVGRect.cjs.map +1 -1
  139. package/cjs/svg/SVGRect.d.ts +2 -2
  140. package/cjs/svg/SVGRect.d.ts.map +1 -1
  141. package/cjs/svg/SVGStringList.cjs.map +1 -1
  142. package/cjs/svg/SVGStringList.d.ts +2 -2
  143. package/cjs/svg/SVGStringList.d.ts.map +1 -1
  144. package/cjs/svg/SVGTransformList.cjs.map +1 -1
  145. package/cjs/svg/SVGTransformList.d.ts +2 -2
  146. package/cjs/svg/SVGTransformList.d.ts.map +1 -1
  147. package/cjs/utilities/XMLEncodeUtility.cjs +26 -2
  148. package/cjs/utilities/XMLEncodeUtility.cjs.map +1 -1
  149. package/cjs/utilities/XMLEncodeUtility.d.ts +16 -2
  150. package/cjs/utilities/XMLEncodeUtility.d.ts.map +1 -1
  151. package/cjs/window/BrowserWindow.cjs +2 -2
  152. package/cjs/window/BrowserWindow.cjs.map +1 -1
  153. package/cjs/xml-http-request/XMLHttpRequestEventTarget.cjs.map +1 -1
  154. package/cjs/xml-http-request/XMLHttpRequestEventTarget.d.ts +1 -1
  155. package/cjs/xml-http-request/XMLHttpRequestEventTarget.d.ts.map +1 -1
  156. package/cjs/xml-parser/XMLParser.cjs +1 -1
  157. package/cjs/xml-parser/XMLParser.cjs.map +1 -1
  158. package/cjs/xml-serializer/XMLSerializer.cjs +6 -6
  159. package/cjs/xml-serializer/XMLSerializer.cjs.map +1 -1
  160. package/lib/PropertySymbol.d.ts +1 -0
  161. package/lib/PropertySymbol.d.ts.map +1 -1
  162. package/lib/PropertySymbol.js +1 -0
  163. package/lib/PropertySymbol.js.map +1 -1
  164. package/lib/async-task-manager/AsyncTaskManager.d.ts.map +1 -1
  165. package/lib/async-task-manager/AsyncTaskManager.js.map +1 -1
  166. package/lib/browser/detached-browser/DetachedBrowser.js.map +1 -1
  167. package/lib/browser/utilities/BrowserExceptionObserver.d.ts.map +1 -1
  168. package/lib/browser/utilities/BrowserExceptionObserver.js +5 -3
  169. package/lib/browser/utilities/BrowserExceptionObserver.js.map +1 -1
  170. package/lib/browser/utilities/BrowserFrameNavigator.d.ts +6 -6
  171. package/lib/browser/utilities/BrowserFrameNavigator.d.ts.map +1 -1
  172. package/lib/browser/utilities/BrowserFrameNavigator.js +1 -1
  173. package/lib/browser/utilities/BrowserFrameNavigator.js.map +1 -1
  174. package/lib/console/VirtualConsole.d.ts +18 -10
  175. package/lib/console/VirtualConsole.d.ts.map +1 -1
  176. package/lib/console/VirtualConsole.js +26 -15
  177. package/lib/console/VirtualConsole.js.map +1 -1
  178. package/lib/cookie/urilities/CookieExpireUtility.d.ts +1 -1
  179. package/lib/cookie/urilities/CookieExpireUtility.d.ts.map +1 -1
  180. package/lib/css/declaration/property-manager/CSSStyleDeclarationPropertyGetParser.d.ts +17 -17
  181. package/lib/css/declaration/property-manager/CSSStyleDeclarationPropertyGetParser.d.ts.map +1 -1
  182. package/lib/event/Event.d.ts +1 -0
  183. package/lib/event/Event.d.ts.map +1 -1
  184. package/lib/event/Event.js +1 -0
  185. package/lib/event/Event.js.map +1 -1
  186. package/lib/event/EventTarget.d.ts.map +1 -1
  187. package/lib/event/EventTarget.js +5 -4
  188. package/lib/event/EventTarget.js.map +1 -1
  189. package/lib/fetch/Fetch.d.ts.map +1 -1
  190. package/lib/fetch/Fetch.js.map +1 -1
  191. package/lib/html-parser/HTMLParser.js +1 -1
  192. package/lib/html-parser/HTMLParser.js.map +1 -1
  193. package/lib/html-serializer/HTMLSerializer.js +2 -2
  194. package/lib/html-serializer/HTMLSerializer.js.map +1 -1
  195. package/lib/nodes/element/Element.d.ts +34 -34
  196. package/lib/nodes/element/Element.d.ts.map +1 -1
  197. package/lib/nodes/element/Element.js.map +1 -1
  198. package/lib/nodes/html-body-element/HTMLBodyElement.d.ts +18 -18
  199. package/lib/nodes/html-body-element/HTMLBodyElement.d.ts.map +1 -1
  200. package/lib/nodes/html-body-element/HTMLBodyElement.js.map +1 -1
  201. package/lib/nodes/html-canvas-element/HTMLCanvasElement.d.ts +5 -5
  202. package/lib/nodes/html-canvas-element/HTMLCanvasElement.d.ts.map +1 -1
  203. package/lib/nodes/html-canvas-element/HTMLCanvasElement.js.map +1 -1
  204. package/lib/nodes/html-details-element/HTMLDetailsElement.d.ts +1 -1
  205. package/lib/nodes/html-details-element/HTMLDetailsElement.d.ts.map +1 -1
  206. package/lib/nodes/html-details-element/HTMLDetailsElement.js.map +1 -1
  207. package/lib/nodes/html-dialog-element/HTMLDialogElement.d.ts +2 -2
  208. package/lib/nodes/html-dialog-element/HTMLDialogElement.d.ts.map +1 -1
  209. package/lib/nodes/html-dialog-element/HTMLDialogElement.js.map +1 -1
  210. package/lib/nodes/html-element/HTMLElement.d.ts +25 -25
  211. package/lib/nodes/html-element/HTMLElement.d.ts.map +1 -1
  212. package/lib/nodes/html-element/HTMLElement.js.map +1 -1
  213. package/lib/nodes/html-form-element/HTMLFormElement.d.ts +3 -3
  214. package/lib/nodes/html-form-element/HTMLFormElement.d.ts.map +1 -1
  215. package/lib/nodes/html-form-element/HTMLFormElement.js.map +1 -1
  216. package/lib/nodes/html-iframe-element/HTMLIFrameElement.d.ts +2 -2
  217. package/lib/nodes/html-iframe-element/HTMLIFrameElement.d.ts.map +1 -1
  218. package/lib/nodes/html-iframe-element/HTMLIFrameElement.js.map +1 -1
  219. package/lib/nodes/html-input-element/HTMLInputElement.d.ts +3 -3
  220. package/lib/nodes/html-input-element/HTMLInputElement.d.ts.map +1 -1
  221. package/lib/nodes/html-input-element/HTMLInputElement.js.map +1 -1
  222. package/lib/nodes/html-media-element/HTMLMediaElement.d.ts +23 -23
  223. package/lib/nodes/html-media-element/HTMLMediaElement.d.ts.map +1 -1
  224. package/lib/nodes/html-media-element/HTMLMediaElement.js.map +1 -1
  225. package/lib/nodes/html-media-element/MediaStream.d.ts +2 -2
  226. package/lib/nodes/html-media-element/MediaStream.d.ts.map +1 -1
  227. package/lib/nodes/html-media-element/MediaStream.js.map +1 -1
  228. package/lib/nodes/html-media-element/MediaStreamTrack.d.ts +3 -3
  229. package/lib/nodes/html-media-element/MediaStreamTrack.d.ts.map +1 -1
  230. package/lib/nodes/html-media-element/MediaStreamTrack.js.map +1 -1
  231. package/lib/nodes/html-select-element/HTMLSelectElement.d.ts +2 -2
  232. package/lib/nodes/html-select-element/HTMLSelectElement.d.ts.map +1 -1
  233. package/lib/nodes/html-select-element/HTMLSelectElement.js.map +1 -1
  234. package/lib/nodes/html-slot-element/HTMLSlotElement.d.ts +1 -1
  235. package/lib/nodes/html-slot-element/HTMLSlotElement.d.ts.map +1 -1
  236. package/lib/nodes/html-slot-element/HTMLSlotElement.js.map +1 -1
  237. package/lib/nodes/html-text-area-element/HTMLTextAreaElement.d.ts +2 -2
  238. package/lib/nodes/html-text-area-element/HTMLTextAreaElement.d.ts.map +1 -1
  239. package/lib/nodes/html-text-area-element/HTMLTextAreaElement.js.map +1 -1
  240. package/lib/nodes/shadow-root/ShadowRoot.d.ts +1 -1
  241. package/lib/nodes/shadow-root/ShadowRoot.d.ts.map +1 -1
  242. package/lib/nodes/shadow-root/ShadowRoot.js.map +1 -1
  243. package/lib/nodes/svg-animation-element/SVGAnimationElement.d.ts +3 -3
  244. package/lib/nodes/svg-animation-element/SVGAnimationElement.d.ts.map +1 -1
  245. package/lib/nodes/svg-animation-element/SVGAnimationElement.js.map +1 -1
  246. package/lib/nodes/svg-element/SVGElement.d.ts +6 -6
  247. package/lib/nodes/svg-element/SVGElement.d.ts.map +1 -1
  248. package/lib/nodes/svg-element/SVGElement.js.map +1 -1
  249. package/lib/nodes/svg-graphics-element/SVGGraphicsElement.d.ts +3 -3
  250. package/lib/nodes/svg-graphics-element/SVGGraphicsElement.d.ts.map +1 -1
  251. package/lib/nodes/svg-graphics-element/SVGGraphicsElement.js.map +1 -1
  252. package/lib/nodes/svg-svg-element/SVGSVGElement.d.ts +18 -18
  253. package/lib/nodes/svg-svg-element/SVGSVGElement.d.ts.map +1 -1
  254. package/lib/nodes/svg-svg-element/SVGSVGElement.js.map +1 -1
  255. package/lib/query-selector/SelectorItem.d.ts.map +1 -1
  256. package/lib/query-selector/SelectorItem.js +2 -1
  257. package/lib/query-selector/SelectorItem.js.map +1 -1
  258. package/lib/svg/SVGAngle.d.ts +2 -2
  259. package/lib/svg/SVGAngle.d.ts.map +1 -1
  260. package/lib/svg/SVGAngle.js.map +1 -1
  261. package/lib/svg/SVGAnimatedBoolean.d.ts +2 -2
  262. package/lib/svg/SVGAnimatedBoolean.d.ts.map +1 -1
  263. package/lib/svg/SVGAnimatedBoolean.js.map +1 -1
  264. package/lib/svg/SVGAnimatedInteger.d.ts +2 -2
  265. package/lib/svg/SVGAnimatedInteger.d.ts.map +1 -1
  266. package/lib/svg/SVGAnimatedInteger.js.map +1 -1
  267. package/lib/svg/SVGAnimatedNumber.d.ts +2 -2
  268. package/lib/svg/SVGAnimatedNumber.d.ts.map +1 -1
  269. package/lib/svg/SVGAnimatedNumber.js.map +1 -1
  270. package/lib/svg/SVGAnimatedString.d.ts +2 -2
  271. package/lib/svg/SVGAnimatedString.d.ts.map +1 -1
  272. package/lib/svg/SVGAnimatedString.js.map +1 -1
  273. package/lib/svg/SVGLength.d.ts +2 -2
  274. package/lib/svg/SVGLength.d.ts.map +1 -1
  275. package/lib/svg/SVGLength.js.map +1 -1
  276. package/lib/svg/SVGLengthList.d.ts +2 -2
  277. package/lib/svg/SVGLengthList.d.ts.map +1 -1
  278. package/lib/svg/SVGLengthList.js.map +1 -1
  279. package/lib/svg/SVGMatrix.d.ts +2 -2
  280. package/lib/svg/SVGMatrix.d.ts.map +1 -1
  281. package/lib/svg/SVGMatrix.js.map +1 -1
  282. package/lib/svg/SVGNumber.d.ts +2 -2
  283. package/lib/svg/SVGNumber.d.ts.map +1 -1
  284. package/lib/svg/SVGNumber.js.map +1 -1
  285. package/lib/svg/SVGNumberList.d.ts +2 -2
  286. package/lib/svg/SVGNumberList.d.ts.map +1 -1
  287. package/lib/svg/SVGNumberList.js.map +1 -1
  288. package/lib/svg/SVGPoint.d.ts +2 -2
  289. package/lib/svg/SVGPoint.d.ts.map +1 -1
  290. package/lib/svg/SVGPoint.js.map +1 -1
  291. package/lib/svg/SVGPointList.d.ts +2 -2
  292. package/lib/svg/SVGPointList.d.ts.map +1 -1
  293. package/lib/svg/SVGPointList.js.map +1 -1
  294. package/lib/svg/SVGPreserveAspectRatio.d.ts +2 -2
  295. package/lib/svg/SVGPreserveAspectRatio.d.ts.map +1 -1
  296. package/lib/svg/SVGPreserveAspectRatio.js.map +1 -1
  297. package/lib/svg/SVGRect.d.ts +2 -2
  298. package/lib/svg/SVGRect.d.ts.map +1 -1
  299. package/lib/svg/SVGRect.js.map +1 -1
  300. package/lib/svg/SVGStringList.d.ts +2 -2
  301. package/lib/svg/SVGStringList.d.ts.map +1 -1
  302. package/lib/svg/SVGStringList.js.map +1 -1
  303. package/lib/svg/SVGTransformList.d.ts +2 -2
  304. package/lib/svg/SVGTransformList.d.ts.map +1 -1
  305. package/lib/svg/SVGTransformList.js.map +1 -1
  306. package/lib/utilities/XMLEncodeUtility.d.ts +16 -2
  307. package/lib/utilities/XMLEncodeUtility.d.ts.map +1 -1
  308. package/lib/utilities/XMLEncodeUtility.js +26 -2
  309. package/lib/utilities/XMLEncodeUtility.js.map +1 -1
  310. package/lib/window/BrowserWindow.js +2 -2
  311. package/lib/window/BrowserWindow.js.map +1 -1
  312. package/lib/xml-http-request/XMLHttpRequestEventTarget.d.ts +1 -1
  313. package/lib/xml-http-request/XMLHttpRequestEventTarget.d.ts.map +1 -1
  314. package/lib/xml-http-request/XMLHttpRequestEventTarget.js.map +1 -1
  315. package/lib/xml-parser/XMLParser.js +1 -1
  316. package/lib/xml-parser/XMLParser.js.map +1 -1
  317. package/lib/xml-serializer/XMLSerializer.js +6 -6
  318. package/lib/xml-serializer/XMLSerializer.js.map +1 -1
  319. package/package.json +1 -1
  320. package/src/PropertySymbol.ts +1 -0
  321. package/src/async-task-manager/AsyncTaskManager.ts +1 -1
  322. package/src/browser/detached-browser/DetachedBrowser.ts +1 -1
  323. package/src/browser/utilities/BrowserExceptionObserver.ts +7 -6
  324. package/src/browser/utilities/BrowserFrameNavigator.ts +7 -7
  325. package/src/console/VirtualConsole.ts +28 -17
  326. package/src/cookie/urilities/CookieExpireUtility.ts +1 -1
  327. package/src/css/declaration/computed-style/CSSStyleDeclarationComputedStyle.ts +2 -2
  328. package/src/css/declaration/property-manager/CSSStyleDeclarationPropertyGetParser.ts +19 -19
  329. package/src/event/Event.ts +1 -0
  330. package/src/event/EventTarget.ts +8 -4
  331. package/src/fetch/Fetch.ts +2 -2
  332. package/src/html-parser/HTMLParser.ts +1 -1
  333. package/src/html-serializer/HTMLSerializer.ts +2 -2
  334. package/src/nodes/element/Element.ts +34 -34
  335. package/src/nodes/html-body-element/HTMLBodyElement.ts +18 -18
  336. package/src/nodes/html-canvas-element/HTMLCanvasElement.ts +5 -5
  337. package/src/nodes/html-details-element/HTMLDetailsElement.ts +1 -1
  338. package/src/nodes/html-dialog-element/HTMLDialogElement.ts +2 -2
  339. package/src/nodes/html-element/HTMLElement.ts +25 -25
  340. package/src/nodes/html-form-element/HTMLFormElement.ts +3 -3
  341. package/src/nodes/html-iframe-element/HTMLIFrameElement.ts +2 -2
  342. package/src/nodes/html-input-element/HTMLInputElement.ts +3 -3
  343. package/src/nodes/html-media-element/HTMLMediaElement.ts +23 -23
  344. package/src/nodes/html-media-element/MediaStream.ts +2 -2
  345. package/src/nodes/html-media-element/MediaStreamTrack.ts +3 -3
  346. package/src/nodes/html-select-element/HTMLSelectElement.ts +2 -2
  347. package/src/nodes/html-slot-element/HTMLSlotElement.ts +1 -1
  348. package/src/nodes/html-text-area-element/HTMLTextAreaElement.ts +2 -2
  349. package/src/nodes/shadow-root/ShadowRoot.ts +1 -1
  350. package/src/nodes/svg-animation-element/SVGAnimationElement.ts +3 -3
  351. package/src/nodes/svg-element/SVGElement.ts +6 -6
  352. package/src/nodes/svg-graphics-element/SVGGraphicsElement.ts +3 -3
  353. package/src/nodes/svg-svg-element/SVGSVGElement.ts +18 -18
  354. package/src/query-selector/SelectorItem.ts +3 -1
  355. package/src/svg/SVGAngle.ts +2 -2
  356. package/src/svg/SVGAnimatedBoolean.ts +2 -2
  357. package/src/svg/SVGAnimatedInteger.ts +2 -2
  358. package/src/svg/SVGAnimatedNumber.ts +2 -2
  359. package/src/svg/SVGAnimatedString.ts +2 -2
  360. package/src/svg/SVGLength.ts +2 -2
  361. package/src/svg/SVGLengthList.ts +2 -2
  362. package/src/svg/SVGMatrix.ts +2 -2
  363. package/src/svg/SVGNumber.ts +2 -2
  364. package/src/svg/SVGNumberList.ts +2 -2
  365. package/src/svg/SVGPoint.ts +2 -2
  366. package/src/svg/SVGPointList.ts +2 -2
  367. package/src/svg/SVGPreserveAspectRatio.ts +2 -2
  368. package/src/svg/SVGRect.ts +2 -2
  369. package/src/svg/SVGStringList.ts +2 -2
  370. package/src/svg/SVGTransformList.ts +2 -2
  371. package/src/utilities/XMLEncodeUtility.ts +29 -2
  372. package/src/window/BrowserWindow.ts +2 -2
  373. package/src/xml-http-request/XMLHttpRequestEventTarget.ts +1 -1
  374. package/src/xml-parser/XMLParser.ts +1 -1
  375. package/src/xml-serializer/XMLSerializer.ts +6 -6
@@ -41,8 +41,8 @@ export default class HTMLIFrameElement extends HTMLElement {
41
41
  public declare cloneNode: (deep?: boolean) => HTMLIFrameElement;
42
42
 
43
43
  // Events
44
- public onload: (event: Event) => void | null = null;
45
- public onerror: (event: Event) => void | null = null;
44
+ public onload: ((event: Event) => void) | null = null;
45
+ public onerror: ((event: Event) => void) | null = null;
46
46
 
47
47
  // Internal properties
48
48
  public [PropertySymbol.sandbox]: DOMTokenList | null = null;
@@ -34,9 +34,9 @@ export default class HTMLInputElement extends HTMLElement {
34
34
  public declare cloneNode: (deep?: boolean) => HTMLInputElement;
35
35
 
36
36
  // Events
37
- public oninput: (event: Event) => void | null = null;
38
- public oninvalid: (event: Event) => void | null = null;
39
- public onselectionchange: (event: Event) => void | null = null;
37
+ public oninput: ((event: Event) => void) | null = null;
38
+ public oninvalid: ((event: Event) => void) | null = null;
39
+ public onselectionchange: ((event: Event) => void) | null = null;
40
40
 
41
41
  public [PropertySymbol.value] = null;
42
42
  public [PropertySymbol.height] = 0;
@@ -28,29 +28,29 @@ export default class HTMLMediaElement extends HTMLElement {
28
28
  public declare cloneNode: (deep?: boolean) => HTMLMediaElement;
29
29
 
30
30
  // Events
31
- public onabort: (event: Event) => void | null = null;
32
- public oncanplay: (event: Event) => void | null = null;
33
- public oncanplaythrough: (event: Event) => void | null = null;
34
- public ondurationchange: (event: Event) => void | null = null;
35
- public onemptied: (event: Event) => void | null = null;
36
- public onended: (event: Event) => void | null = null;
37
- public onerror: (event: ErrorEvent) => void | null = null;
38
- public onloadeddata: (event: Event) => void | null = null;
39
- public onloadedmetadata: (event: Event) => void | null = null;
40
- public onloadstart: (event: Event) => void | null = null;
41
- public onpause: (event: Event) => void | null = null;
42
- public onplay: (event: Event) => void | null = null;
43
- public onplaying: (event: Event) => void | null = null;
44
- public onprogress: (event: Event) => void | null = null;
45
- public onratechange: (event: Event) => void | null = null;
46
- public onresize: (event: Event) => void | null = null;
47
- public onseeked: (event: Event) => void | null = null;
48
- public onseeking: (event: Event) => void | null = null;
49
- public onstalled: (event: Event) => void | null = null;
50
- public onsuspend: (event: Event) => void | null = null;
51
- public ontimeupdate: (event: Event) => void | null = null;
52
- public onvolumechange: (event: Event) => void | null = null;
53
- public onwaiting: (event: Event) => void | null = null;
31
+ public onabort: ((event: Event) => void) | null = null;
32
+ public oncanplay: ((event: Event) => void) | null = null;
33
+ public oncanplaythrough: ((event: Event) => void) | null = null;
34
+ public ondurationchange: ((event: Event) => void) | null = null;
35
+ public onemptied: ((event: Event) => void) | null = null;
36
+ public onended: ((event: Event) => void) | null = null;
37
+ public onerror: ((event: ErrorEvent) => void) | null = null;
38
+ public onloadeddata: ((event: Event) => void) | null = null;
39
+ public onloadedmetadata: ((event: Event) => void) | null = null;
40
+ public onloadstart: ((event: Event) => void) | null = null;
41
+ public onpause: ((event: Event) => void) | null = null;
42
+ public onplay: ((event: Event) => void) | null = null;
43
+ public onplaying: ((event: Event) => void) | null = null;
44
+ public onprogress: ((event: Event) => void) | null = null;
45
+ public onratechange: ((event: Event) => void) | null = null;
46
+ public onresize: ((event: Event) => void) | null = null;
47
+ public onseeked: ((event: Event) => void) | null = null;
48
+ public onseeking: ((event: Event) => void) | null = null;
49
+ public onstalled: ((event: Event) => void) | null = null;
50
+ public onsuspend: ((event: Event) => void) | null = null;
51
+ public ontimeupdate: ((event: Event) => void) | null = null;
52
+ public onvolumechange: ((event: Event) => void) | null = null;
53
+ public onwaiting: ((event: Event) => void) | null = null;
54
54
 
55
55
  // Internal Properties
56
56
  public [PropertySymbol.volume] = 1;
@@ -15,8 +15,8 @@ export default class MediaStream extends EventTarget {
15
15
  public id: string = Crypto.randomUUID();
16
16
 
17
17
  // Events
18
- public onaddtrack: (event: MediaStreamTrackEvent) => void | null = null;
19
- public onremovetrack: (event: MediaStreamTrackEvent) => void | null = null;
18
+ public onaddtrack: ((event: MediaStreamTrackEvent) => void) | null = null;
19
+ public onremovetrack: ((event: MediaStreamTrackEvent) => void) | null = null;
20
20
 
21
21
  // Internal properties
22
22
  public [PropertySymbol.tracks]: MediaStreamTrack[] = [];
@@ -59,9 +59,9 @@ export default class MediaStreamTrack extends EventTarget {
59
59
  public [PropertySymbol.settings]: IMediaTrackSettings = JSON.parse(JSON.stringify(SETTINGS));
60
60
 
61
61
  // Events
62
- public onended: (event: Event) => void | null = null;
63
- public onmute: (event: Event) => void | null = null;
64
- public onunmute: (event: Event) => void | null = null;
62
+ public onended: ((event: Event) => void) | null = null;
63
+ public onmute: ((event: Event) => void) | null = null;
64
+ public onunmute: ((event: Event) => void) | null = null;
65
65
 
66
66
  /**
67
67
  * Constructor.
@@ -32,8 +32,8 @@ export default class HTMLSelectElement extends HTMLElement {
32
32
  public [PropertySymbol.proxy]: HTMLSelectElement;
33
33
 
34
34
  // Events
35
- public onchange: (event: Event) => void | null = null;
36
- public oninput: (event: Event) => void | null = null;
35
+ public onchange: ((event: Event) => void) | null = null;
36
+ public oninput: ((event: Event) => void) | null = null;
37
37
 
38
38
  /**
39
39
  * Constructor.
@@ -22,7 +22,7 @@ export default class HTMLSlotElement extends HTMLElement {
22
22
  public [PropertySymbol.assignedNodes]: Node[] = [];
23
23
 
24
24
  // Events
25
- public onslotchange: (event: Event) => void | null = null;
25
+ public onslotchange: ((event: Event) => void) | null = null;
26
26
 
27
27
  /**
28
28
  * Returns name.
@@ -22,8 +22,8 @@ export default class HTMLTextAreaElement extends HTMLElement {
22
22
  public readonly type = 'textarea';
23
23
 
24
24
  // Events
25
- public oninput: (event: Event) => void | null = null;
26
- public onselectionchange: (event: Event) => void | null = null;
25
+ public oninput: ((event: Event) => void) | null = null;
26
+ public onselectionchange: ((event: Event) => void) | null = null;
27
27
 
28
28
  // Internal properties
29
29
  public [PropertySymbol.validationMessage] = '';
@@ -17,7 +17,7 @@ export default class ShadowRoot extends DocumentFragment {
17
17
  public declare cloneNode: (deep?: boolean) => ShadowRoot;
18
18
 
19
19
  // Events
20
- public onslotchange: (event: Event) => void | null = null;
20
+ public onslotchange: ((event: Event) => void) | null = null;
21
21
 
22
22
  // Internal properties
23
23
  public [PropertySymbol.adoptedStyleSheets]: CSSStyleSheet[] = [];
@@ -14,9 +14,9 @@ export default class SVGAnimationElement extends SVGElement {
14
14
  public [PropertySymbol.systemLanguage]: SVGStringList | null = null;
15
15
 
16
16
  // Events
17
- public onbegin: (event: Event) => void | null = null;
18
- public onend: (event: Event) => void | null = null;
19
- public onrepeat: (event: Event) => void | null = null;
17
+ public onbegin: ((event: Event) => void) | null = null;
18
+ public onend: ((event: Event) => void) | null = null;
19
+ public onrepeat: ((event: Event) => void) | null = null;
20
20
 
21
21
  /**
22
22
  * Returns required extensions.
@@ -14,12 +14,12 @@ import DOMStringMap from '../../dom/DOMStringMap.js';
14
14
  */
15
15
  export default class SVGElement extends Element {
16
16
  // Events
17
- public onabort: (event: Event) => void | null = null;
18
- public onerror: (event: Event) => void | null = null;
19
- public onload: (event: Event) => void | null = null;
20
- public onresize: (event: Event) => void | null = null;
21
- public onscroll: (event: Event) => void | null = null;
22
- public onunload: (event: Event) => void | null = null;
17
+ public onabort: ((event: Event) => void) | null = null;
18
+ public onerror: ((event: Event) => void) | null = null;
19
+ public onload: ((event: Event) => void) | null = null;
20
+ public onresize: ((event: Event) => void) | null = null;
21
+ public onscroll: ((event: Event) => void) | null = null;
22
+ public onunload: ((event: Event) => void) | null = null;
23
23
 
24
24
  // Internal properties
25
25
  public [PropertySymbol.style]: CSSStyleDeclaration | null = null;
@@ -18,9 +18,9 @@ export default class SVGGraphicsElement extends SVGElement {
18
18
  public [PropertySymbol.transform]: SVGAnimatedTransformList | null = null;
19
19
 
20
20
  // Events
21
- public oncopy: (event: Event) => void | null = null;
22
- public oncut: (event: Event) => void | null = null;
23
- public onpaste: (event: Event) => void | null = null;
21
+ public oncopy: ((event: Event) => void) | null = null;
22
+ public oncut: ((event: Event) => void) | null = null;
23
+ public onpaste: ((event: Event) => void) | null = null;
24
24
 
25
25
  /**
26
26
  * Returns required extensions.
@@ -38,24 +38,24 @@ export default class SVGSVGElement extends SVGGraphicsElement {
38
38
  public declare cloneNode: (deep?: boolean) => SVGSVGElement;
39
39
 
40
40
  // Events
41
- public onafterprint: (event: Event) => void | null = null;
42
- public onbeforeprint: (event: Event) => void | null = null;
43
- public onbeforeunload: (event: Event) => void | null = null;
44
- public ongamepadconnected: (event: Event) => void | null = null;
45
- public ongamepaddisconnected: (event: Event) => void | null = null;
46
- public onhashchange: (event: Event) => void | null = null;
47
- public onlanguagechange: (event: Event) => void | null = null;
48
- public onmessage: (event: Event) => void | null = null;
49
- public onmessageerror: (event: Event) => void | null = null;
50
- public onoffline: (event: Event) => void | null = null;
51
- public ononline: (event: Event) => void | null = null;
52
- public onpagehide: (event: Event) => void | null = null;
53
- public onpageshow: (event: Event) => void | null = null;
54
- public onpopstate: (event: Event) => void | null = null;
55
- public onrejectionhandled: (event: Event) => void | null = null;
56
- public onstorage: (event: Event) => void | null = null;
57
- public onunhandledrejection: (event: Event) => void | null = null;
58
- public onunload: (event: Event) => void | null = null;
41
+ public onafterprint: ((event: Event) => void) | null = null;
42
+ public onbeforeprint: ((event: Event) => void) | null = null;
43
+ public onbeforeunload: ((event: Event) => void) | null = null;
44
+ public ongamepadconnected: ((event: Event) => void) | null = null;
45
+ public ongamepaddisconnected: ((event: Event) => void) | null = null;
46
+ public onhashchange: ((event: Event) => void) | null = null;
47
+ public onlanguagechange: ((event: Event) => void) | null = null;
48
+ public onmessage: ((event: Event) => void) | null = null;
49
+ public onmessageerror: ((event: Event) => void) | null = null;
50
+ public onoffline: ((event: Event) => void) | null = null;
51
+ public ononline: ((event: Event) => void) | null = null;
52
+ public onpagehide: ((event: Event) => void) | null = null;
53
+ public onpageshow: ((event: Event) => void) | null = null;
54
+ public onpopstate: ((event: Event) => void) | null = null;
55
+ public onrejectionhandled: ((event: Event) => void) | null = null;
56
+ public onstorage: ((event: Event) => void) | null = null;
57
+ public onunhandledrejection: ((event: Event) => void) | null = null;
58
+ public onunload: ((event: Event) => void) | null = null;
59
59
 
60
60
  /**
61
61
  * Returns preserve aspect ratio.
@@ -7,6 +7,8 @@ import ISelectorAttribute from './ISelectorAttribute.js';
7
7
  import ISelectorMatch from './ISelectorMatch.js';
8
8
  import ISelectorPseudo from './ISelectorPseudo.js';
9
9
 
10
+ const SPACE_REGEXP = /\s+/;
11
+
10
12
  /**
11
13
  * Selector item.
12
14
  */
@@ -417,7 +419,7 @@ export default class SelectorItem {
417
419
  return null;
418
420
  }
419
421
 
420
- const classList = element.className.split(' ');
422
+ const classList = element.className.split(SPACE_REGEXP);
421
423
  let priorityWeight = 0;
422
424
 
423
425
  for (const className of this.classNames) {
@@ -19,8 +19,8 @@ export default class SVGAngle {
19
19
 
20
20
  // Internal properties
21
21
  public [PropertySymbol.window]: BrowserWindow;
22
- public [PropertySymbol.getAttribute]: () => string | null = null;
23
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
22
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
23
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
24
24
  public [PropertySymbol.attributeValue]: string = '';
25
25
  public [PropertySymbol.readOnly]: boolean = false;
26
26
 
@@ -9,8 +9,8 @@ import BrowserWindow from '../window/BrowserWindow.js';
9
9
  export default class SVGAnimatedBoolean {
10
10
  // Internal properties
11
11
  public [PropertySymbol.window]: BrowserWindow;
12
- public [PropertySymbol.getAttribute]: () => string | null = null;
13
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
12
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
13
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
14
14
 
15
15
  /**
16
16
  * Constructor.
@@ -9,8 +9,8 @@ import BrowserWindow from '../window/BrowserWindow.js';
9
9
  export default class SVGAnimatedInteger {
10
10
  // Internal properties
11
11
  public [PropertySymbol.window]: BrowserWindow;
12
- public [PropertySymbol.getAttribute]: () => string | null = null;
13
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
12
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
13
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
14
14
 
15
15
  /**
16
16
  * Constructor.
@@ -9,8 +9,8 @@ import BrowserWindow from '../window/BrowserWindow.js';
9
9
  export default class SVGAnimatedNumber {
10
10
  // Internal properties
11
11
  public [PropertySymbol.window]: BrowserWindow;
12
- public [PropertySymbol.getAttribute]: () => string | null = null;
13
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
12
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
13
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
14
14
  public [PropertySymbol.defaultValue]: number = 0;
15
15
 
16
16
  /**
@@ -9,8 +9,8 @@ import BrowserWindow from '../window/BrowserWindow.js';
9
9
  export default class SVGAnimatedString {
10
10
  // Internal properties
11
11
  public [PropertySymbol.window]: BrowserWindow;
12
- public [PropertySymbol.getAttribute]: () => string | null = null;
13
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
12
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
13
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
14
14
 
15
15
  /**
16
16
  * Constructor.
@@ -25,8 +25,8 @@ export default class SVGLength {
25
25
 
26
26
  // Internal properties
27
27
  public [PropertySymbol.window]: BrowserWindow;
28
- public [PropertySymbol.getAttribute]: () => string | null = null;
29
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
28
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
29
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
30
30
  public [PropertySymbol.attributeValue]: string | null = null;
31
31
  public [PropertySymbol.readOnly]: boolean = false;
32
32
 
@@ -15,8 +15,8 @@ export default class SVGLengthList {
15
15
  [index: number]: SVGLength;
16
16
 
17
17
  public [PropertySymbol.window]: BrowserWindow;
18
- public [PropertySymbol.getAttribute]: () => string | null = null;
19
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
18
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
19
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
20
20
  public [PropertySymbol.readOnly]: boolean = false;
21
21
  private [PropertySymbol.cache]: { items: SVGLength[]; attributeValue: string } = {
22
22
  items: [],
@@ -13,8 +13,8 @@ const TRANSFORM_PARAMETER_SPLIT_REGEXP = /[\s,]+/;
13
13
  export default class SVGMatrix {
14
14
  // Internal properties
15
15
  public [PropertySymbol.window]: BrowserWindow;
16
- public [PropertySymbol.getAttribute]: () => string | null = null;
17
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
16
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
17
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
18
18
  public [PropertySymbol.attributeValue]: string | null = null;
19
19
  public [PropertySymbol.readOnly]: boolean = false;
20
20
 
@@ -9,8 +9,8 @@ import BrowserWindow from '../window/BrowserWindow.js';
9
9
  export default class SVGNumber {
10
10
  // Internal properties
11
11
  public [PropertySymbol.window]: BrowserWindow;
12
- public [PropertySymbol.getAttribute]: () => string | null = null;
13
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
12
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
13
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
14
14
  public [PropertySymbol.attributeValue]: string | null = null;
15
15
  public [PropertySymbol.readOnly]: boolean = false;
16
16
 
@@ -15,8 +15,8 @@ export default class SVGNumberList {
15
15
  [index: number]: SVGNumber;
16
16
 
17
17
  public [PropertySymbol.window]: BrowserWindow;
18
- public [PropertySymbol.getAttribute]: () => string | null = null;
19
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
18
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
19
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
20
20
  public [PropertySymbol.readOnly]: boolean = false;
21
21
  private [PropertySymbol.cache]: { items: SVGNumber[]; attributeValue: string } = {
22
22
  items: [],
@@ -11,8 +11,8 @@ const ATTRIBUTE_SEPARATOR_REGEXP = /[\t\f\n\r, ]+/;
11
11
  export default class SVGPoint {
12
12
  // Internal properties
13
13
  public [PropertySymbol.window]: BrowserWindow;
14
- public [PropertySymbol.getAttribute]: () => string | null = null;
15
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
14
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
15
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
16
16
  public [PropertySymbol.attributeValue]: string | null = null;
17
17
  public [PropertySymbol.readOnly]: boolean = false;
18
18
 
@@ -15,8 +15,8 @@ export default class SVGPointList {
15
15
  [index: number]: SVGPoint;
16
16
 
17
17
  public [PropertySymbol.window]: BrowserWindow;
18
- public [PropertySymbol.getAttribute]: () => string | null = null;
19
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
18
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
19
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
20
20
  public [PropertySymbol.readOnly]: boolean = false;
21
21
  private [PropertySymbol.cache]: { items: SVGPoint[]; attributeValue: string } = {
22
22
  items: [],
@@ -33,8 +33,8 @@ export default class SVGPreserveAspectRatio {
33
33
 
34
34
  // Internal properties
35
35
  public [PropertySymbol.window]: BrowserWindow;
36
- public [PropertySymbol.getAttribute]: () => string | null = null;
37
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
36
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
37
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
38
38
  public [PropertySymbol.attributeValue]: string | null = null;
39
39
  public [PropertySymbol.readOnly]: boolean = false;
40
40
 
@@ -9,8 +9,8 @@ import BrowserWindow from '../window/BrowserWindow.js';
9
9
  export default class SVGRect {
10
10
  // Internal properties
11
11
  public [PropertySymbol.window]: BrowserWindow;
12
- public [PropertySymbol.getAttribute]: () => string | null = null;
13
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
12
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
13
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
14
14
  public [PropertySymbol.attributeValue]: string | null = null;
15
15
  public [PropertySymbol.readOnly]: boolean = false;
16
16
 
@@ -14,8 +14,8 @@ export default class SVGStringList {
14
14
  [index: number]: string;
15
15
 
16
16
  public [PropertySymbol.window]: BrowserWindow;
17
- public [PropertySymbol.getAttribute]: () => string | null = null;
18
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
17
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
18
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
19
19
  public [PropertySymbol.readOnly]: boolean = false;
20
20
  private [PropertySymbol.cache]: { items: string[]; attributeValue: string } = {
21
21
  items: [],
@@ -16,8 +16,8 @@ export default class SVGTransformList {
16
16
  [index: number]: SVGTransform;
17
17
 
18
18
  public [PropertySymbol.window]: BrowserWindow;
19
- public [PropertySymbol.getAttribute]: () => string | null = null;
20
- public [PropertySymbol.setAttribute]: (value: string) => void | null = null;
19
+ public [PropertySymbol.getAttribute]: (() => string | null) | null = null;
20
+ public [PropertySymbol.setAttribute]: ((value: string) => void) | null = null;
21
21
  public [PropertySymbol.readOnly]: boolean = false;
22
22
  private [PropertySymbol.cache]: { items: SVGTransform[]; attributeValue: string } = {
23
23
  items: [],
@@ -8,7 +8,7 @@ export default class XMLEncodeUtility {
8
8
  * @param value Value.
9
9
  * @returns Escaped value.
10
10
  */
11
- public static encodeAttributeValue(value: string | null): string {
11
+ public static encodeXMLAttributeValue(value: string | null): string {
12
12
  if (value === null) {
13
13
  return '';
14
14
  }
@@ -28,7 +28,7 @@ export default class XMLEncodeUtility {
28
28
  * @param value Value.
29
29
  * @returns Decoded value.
30
30
  */
31
- public static decodeAttributeValue(value: string | null): string {
31
+ public static decodeXMLAttributeValue(value: string | null): string {
32
32
  if (value === null) {
33
33
  return '';
34
34
  }
@@ -43,6 +43,33 @@ export default class XMLEncodeUtility {
43
43
  .replace(/&/gu, '&');
44
44
  }
45
45
 
46
+ /**
47
+ * Encodes attribute value.
48
+ *
49
+ * @param value Value.
50
+ * @returns Escaped value.
51
+ */
52
+ public static encodeHTMLAttributeValue(value: string | null): string {
53
+ if (value === null) {
54
+ return '';
55
+ }
56
+ return value.replace(/&/gu, '&').replace(/"/gu, '"');
57
+ }
58
+
59
+ /**
60
+ * Decodes attribute value.
61
+ *
62
+ * @param value Value.
63
+ * @returns Decoded value.
64
+ */
65
+ public static decodeHTMLAttributeValue(value: string | null): string {
66
+ if (value === null) {
67
+ return '';
68
+ }
69
+
70
+ return value.replace(/"/gu, '"').replace(/&/gu, '&');
71
+ }
72
+
46
73
  /**
47
74
  * Encodes text content.
48
75
  *
@@ -845,15 +845,15 @@ export default class BrowserWindow extends EventTarget implements INodeJSGlobal
845
845
  // Not sure why target is set to document here, but this is how it works in the browser
846
846
  const loadEvent = new Event('load');
847
847
 
848
- loadEvent[PropertySymbol.currentTarget] = this.document;
848
+ loadEvent[PropertySymbol.currentTarget] = this;
849
849
  loadEvent[PropertySymbol.target] = this.document;
850
850
  loadEvent[PropertySymbol.eventPhase] = EventPhaseEnum.atTarget;
851
851
 
852
852
  this.dispatchEvent(loadEvent);
853
853
 
854
- loadEvent[PropertySymbol.target] = null;
855
854
  loadEvent[PropertySymbol.currentTarget] = null;
856
855
  loadEvent[PropertySymbol.eventPhase] = EventPhaseEnum.none;
856
+ loadEvent[PropertySymbol.dispatching] = false;
857
857
  });
858
858
 
859
859
  this[PropertySymbol.bindMethods]();
@@ -9,7 +9,7 @@ export type ProgressEventListener = (event: ProgressEvent) => void;
9
9
  export default class XMLHttpRequestEventTarget extends EventTarget {
10
10
  public onloadstart: ProgressEventListener | null = null;
11
11
  public onprogress: ProgressEventListener | null = null;
12
- public onabort: (event: ProgressEvent) => void | null = null;
12
+ public onabort: ((event: ProgressEvent) => void) | null = null;
13
13
  public onerror: ProgressEventListener | null = null;
14
14
  public onload: ProgressEventListener | null = null;
15
15
  public ontimeout: ProgressEventListener | null = null;
@@ -487,7 +487,7 @@ export default class XMLParser {
487
487
 
488
488
  // In XML, new line characters should be replaced with a space.
489
489
  const value = rawValue
490
- ? XMLEncodeUtility.decodeAttributeValue(rawValue.replace(NEW_LINE_REGEXP, ' '))
490
+ ? XMLEncodeUtility.decodeXMLAttributeValue(rawValue.replace(NEW_LINE_REGEXP, ' '))
491
491
  : '';
492
492
  const attributes = this.nextElement[PropertySymbol.attributes];
493
493
  const nameParts = name.split(':');
@@ -229,7 +229,7 @@ export default class XMLSerializer {
229
229
  attribute[PropertySymbol.localName] === elementPrefix &&
230
230
  element[PropertySymbol.namespaceURI]
231
231
  ) {
232
- namespaceString += ` xmlns:${elementPrefix}="${XMLEncodeUtility.encodeAttributeValue(
232
+ namespaceString += ` xmlns:${elementPrefix}="${XMLEncodeUtility.encodeXMLAttributeValue(
233
233
  element[PropertySymbol.namespaceURI]
234
234
  )}"`;
235
235
  handledNamespaces.add(element[PropertySymbol.namespaceURI]);
@@ -238,20 +238,20 @@ export default class XMLSerializer {
238
238
  attribute[PropertySymbol.name] === 'xmlns' &&
239
239
  element[PropertySymbol.namespaceURI]
240
240
  ) {
241
- namespaceString += ` xmlns="${XMLEncodeUtility.encodeAttributeValue(
241
+ namespaceString += ` xmlns="${XMLEncodeUtility.encodeXMLAttributeValue(
242
242
  element[PropertySymbol.namespaceURI]
243
243
  )}"`;
244
244
  handledNamespaces.add(element[PropertySymbol.namespaceURI]);
245
245
  } else {
246
246
  namespaceString += ` ${
247
247
  attribute[PropertySymbol.name]
248
- }="${XMLEncodeUtility.encodeAttributeValue(attribute[PropertySymbol.value])}"`;
248
+ }="${XMLEncodeUtility.encodeXMLAttributeValue(attribute[PropertySymbol.value])}"`;
249
249
  handledNamespaces.add(attribute[PropertySymbol.value]);
250
250
  }
251
251
  } else {
252
252
  attributeString += ` ${
253
253
  attribute[PropertySymbol.name]
254
- }="${XMLEncodeUtility.encodeAttributeValue(attribute[PropertySymbol.value])}"`;
254
+ }="${XMLEncodeUtility.encodeXMLAttributeValue(attribute[PropertySymbol.value])}"`;
255
255
  }
256
256
  }
257
257
 
@@ -262,14 +262,14 @@ export default class XMLSerializer {
262
262
  !handledNamespaces.has(element[PropertySymbol.namespaceURI])
263
263
  ) {
264
264
  if (elementPrefix && !inheritedNamespacePrefixes.has(element[PropertySymbol.namespaceURI])) {
265
- namespaceString += ` xmlns:${elementPrefix}="${XMLEncodeUtility.encodeAttributeValue(
265
+ namespaceString += ` xmlns:${elementPrefix}="${XMLEncodeUtility.encodeXMLAttributeValue(
266
266
  element[PropertySymbol.namespaceURI]
267
267
  )}"`;
268
268
  } else if (
269
269
  !elementPrefix &&
270
270
  inheritedDefaultNamespace !== element[PropertySymbol.namespaceURI]
271
271
  ) {
272
- namespaceString += ` xmlns="${XMLEncodeUtility.encodeAttributeValue(
272
+ namespaceString += ` xmlns="${XMLEncodeUtility.encodeXMLAttributeValue(
273
273
  element[PropertySymbol.namespaceURI]
274
274
  )}"`;
275
275
  }