happy-dom 2.53.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (303) hide show
  1. package/README.md +26 -6
  2. package/lib/async-task-manager/AsyncTaskManager.js +34 -78
  3. package/lib/async-task-manager/AsyncTaskManager.js.map +1 -1
  4. package/lib/attribute/Attr.js +19 -28
  5. package/lib/attribute/Attr.js.map +1 -1
  6. package/lib/config/ElementTag.d.ts +2 -1
  7. package/lib/config/ElementTag.js +16 -15
  8. package/lib/config/ElementTag.js.map +1 -1
  9. package/lib/config/NonImplemenetedElementClasses.js +0 -1
  10. package/lib/config/NonImplemenetedElementClasses.js.map +1 -1
  11. package/lib/cookie/CookieUtility.js +21 -26
  12. package/lib/cookie/CookieUtility.js.map +1 -1
  13. package/lib/css/CSS.js +12 -18
  14. package/lib/css/CSS.js.map +1 -1
  15. package/lib/css/CSSParser.js +29 -33
  16. package/lib/css/CSSParser.js.map +1 -1
  17. package/lib/css/CSSRule.js +24 -29
  18. package/lib/css/CSSRule.js.map +1 -1
  19. package/lib/css/CSSStyleDeclaration.js +4516 -6005
  20. package/lib/css/CSSStyleDeclaration.js.map +1 -1
  21. package/lib/css/CSSStyleSheet.js +17 -59
  22. package/lib/css/CSSStyleSheet.js.map +1 -1
  23. package/lib/css/CSSUnitValue.js +4 -5
  24. package/lib/css/CSSUnitValue.js.map +1 -1
  25. package/lib/css/MediaList.js +23 -28
  26. package/lib/css/MediaList.js.map +1 -1
  27. package/lib/css/rules/CSSFontFaceRule.js +6 -24
  28. package/lib/css/rules/CSSFontFaceRule.js.map +1 -1
  29. package/lib/css/rules/CSSKeyframeRule.js +14 -36
  30. package/lib/css/rules/CSSKeyframeRule.js.map +1 -1
  31. package/lib/css/rules/CSSKeyframesRule.js +31 -54
  32. package/lib/css/rules/CSSKeyframesRule.js.map +1 -1
  33. package/lib/css/rules/CSSMediaRule.js +29 -56
  34. package/lib/css/rules/CSSMediaRule.js.map +1 -1
  35. package/lib/css/rules/CSSStyleRule.js +16 -38
  36. package/lib/css/rules/CSSStyleRule.js.map +1 -1
  37. package/lib/custom-element/CustomElementRegistry.js +21 -24
  38. package/lib/custom-element/CustomElementRegistry.js.map +1 -1
  39. package/lib/dom-implementation/DOMImplementation.js +12 -13
  40. package/lib/dom-implementation/DOMImplementation.js.map +1 -1
  41. package/lib/dom-parser/DOMParser.js +29 -35
  42. package/lib/dom-parser/DOMParser.js.map +1 -1
  43. package/lib/dom-token-list/DOMTokenList.js +64 -79
  44. package/lib/dom-token-list/DOMTokenList.js.map +1 -1
  45. package/lib/event/DataTransfer.js +4 -5
  46. package/lib/event/DataTransfer.js.map +1 -1
  47. package/lib/event/DataTransferItem.js +7 -8
  48. package/lib/event/DataTransferItem.js.map +1 -1
  49. package/lib/event/DataTransferItemList.js +10 -11
  50. package/lib/event/DataTransferItemList.js.map +1 -1
  51. package/lib/event/Event.js +11 -15
  52. package/lib/event/Event.js.map +1 -1
  53. package/lib/event/EventTarget.js +14 -16
  54. package/lib/event/EventTarget.js.map +1 -1
  55. package/lib/event/IUIEventInit.d.ts +2 -2
  56. package/lib/event/UIEvent.d.ts +2 -2
  57. package/lib/event/UIEvent.js +25 -46
  58. package/lib/event/UIEvent.js.map +1 -1
  59. package/lib/event/events/AnimationEvent.js +11 -29
  60. package/lib/event/events/AnimationEvent.js.map +1 -1
  61. package/lib/event/events/CustomEvent.js +9 -31
  62. package/lib/event/events/CustomEvent.js.map +1 -1
  63. package/lib/event/events/ErrorEvent.js +15 -34
  64. package/lib/event/events/ErrorEvent.js.map +1 -1
  65. package/lib/event/events/FocusEvent.js +7 -26
  66. package/lib/event/events/FocusEvent.js.map +1 -1
  67. package/lib/event/events/InputEvent.js +13 -32
  68. package/lib/event/events/InputEvent.js.map +1 -1
  69. package/lib/event/events/KeyboardEvent.js +27 -46
  70. package/lib/event/events/KeyboardEvent.js.map +1 -1
  71. package/lib/event/events/MouseEvent.js +33 -52
  72. package/lib/event/events/MouseEvent.js.map +1 -1
  73. package/lib/event/events/PointerEvent.js +25 -44
  74. package/lib/event/events/PointerEvent.js.map +1 -1
  75. package/lib/event/events/ProgressEvent.js +11 -30
  76. package/lib/event/events/ProgressEvent.js.map +1 -1
  77. package/lib/event/events/StorageEvent.js +13 -32
  78. package/lib/event/events/StorageEvent.js.map +1 -1
  79. package/lib/event/events/WheelEvent.js +16 -35
  80. package/lib/event/events/WheelEvent.js.map +1 -1
  81. package/lib/exception/DOMException.js +5 -24
  82. package/lib/exception/DOMException.js.map +1 -1
  83. package/lib/fetch/FetchHandler.js +18 -22
  84. package/lib/fetch/FetchHandler.js.map +1 -1
  85. package/lib/fetch/Headers.js +3 -23
  86. package/lib/fetch/Headers.js.map +1 -1
  87. package/lib/fetch/Request.js +61 -81
  88. package/lib/fetch/Request.js.map +1 -1
  89. package/lib/fetch/ResourceFetchHandler.js +18 -67
  90. package/lib/fetch/ResourceFetchHandler.js.map +1 -1
  91. package/lib/fetch/Response.js +61 -81
  92. package/lib/fetch/Response.js.map +1 -1
  93. package/lib/file/Blob.js +29 -78
  94. package/lib/file/Blob.js.map +1 -1
  95. package/lib/file/File.js +9 -27
  96. package/lib/file/File.js.map +1 -1
  97. package/lib/file/FileReader.js +57 -78
  98. package/lib/file/FileReader.js.map +1 -1
  99. package/lib/history/History.js +32 -37
  100. package/lib/history/History.js.map +1 -1
  101. package/lib/index.d.ts +5 -3
  102. package/lib/index.js +71 -69
  103. package/lib/index.js.map +1 -1
  104. package/lib/location/Location.js +11 -28
  105. package/lib/location/Location.js.map +1 -1
  106. package/lib/location/RelativeURL.js +5 -8
  107. package/lib/location/RelativeURL.js.map +1 -1
  108. package/lib/location/URL.js +46 -59
  109. package/lib/location/URL.js.map +1 -1
  110. package/lib/match-media/MediaQueryList.js +28 -54
  111. package/lib/match-media/MediaQueryList.js.map +1 -1
  112. package/lib/mutation-observer/MutationListener.js +3 -4
  113. package/lib/mutation-observer/MutationListener.js.map +1 -1
  114. package/lib/mutation-observer/MutationObserver.js +12 -13
  115. package/lib/mutation-observer/MutationObserver.js.map +1 -1
  116. package/lib/mutation-observer/MutationRecord.js +3 -4
  117. package/lib/mutation-observer/MutationRecord.js.map +1 -1
  118. package/lib/navigator/MimeType.js +5 -6
  119. package/lib/navigator/MimeType.js.map +1 -1
  120. package/lib/navigator/MimeTypeArray.js +10 -11
  121. package/lib/navigator/MimeTypeArray.js.map +1 -1
  122. package/lib/navigator/Navigator.js +7 -8
  123. package/lib/navigator/Navigator.js.map +1 -1
  124. package/lib/navigator/Plugin.js +10 -11
  125. package/lib/navigator/Plugin.js.map +1 -1
  126. package/lib/navigator/PluginArray.js +12 -13
  127. package/lib/navigator/PluginArray.js.map +1 -1
  128. package/lib/nodes/character-data/CharacterData.js +119 -184
  129. package/lib/nodes/character-data/CharacterData.js.map +1 -1
  130. package/lib/nodes/character-data/CharacterDataUtility.js +12 -15
  131. package/lib/nodes/character-data/CharacterDataUtility.js.map +1 -1
  132. package/lib/nodes/child-node/ChildNodeUtility.js +24 -45
  133. package/lib/nodes/child-node/ChildNodeUtility.js.map +1 -1
  134. package/lib/nodes/child-node/NonDocumentChildNodeUtility.js +9 -12
  135. package/lib/nodes/child-node/NonDocumentChildNodeUtility.js.map +1 -1
  136. package/lib/nodes/comment/Comment.js +20 -43
  137. package/lib/nodes/comment/Comment.js.map +1 -1
  138. package/lib/nodes/document/Document.d.ts +3 -3
  139. package/lib/nodes/document/Document.js +334 -461
  140. package/lib/nodes/document/Document.js.map +1 -1
  141. package/lib/nodes/document/DocumentReadyStateManager.js +16 -19
  142. package/lib/nodes/document/DocumentReadyStateManager.js.map +1 -1
  143. package/lib/nodes/document/IDocument.d.ts +2 -2
  144. package/lib/nodes/document-fragment/DocumentFragment.js +93 -153
  145. package/lib/nodes/document-fragment/DocumentFragment.js.map +1 -1
  146. package/lib/nodes/document-type/DocumentType.js +22 -45
  147. package/lib/nodes/document-type/DocumentType.js.map +1 -1
  148. package/lib/nodes/element/DOMRect.js +3 -4
  149. package/lib/nodes/element/DOMRect.js.map +1 -1
  150. package/lib/nodes/element/Element.js +367 -496
  151. package/lib/nodes/element/Element.js.map +1 -1
  152. package/lib/nodes/element/HTMLCollection.js +4 -24
  153. package/lib/nodes/element/HTMLCollection.js.map +1 -1
  154. package/lib/nodes/element/HTMLCollectionFactory.js +6 -9
  155. package/lib/nodes/element/HTMLCollectionFactory.js.map +1 -1
  156. package/lib/nodes/element/Range.js +89 -114
  157. package/lib/nodes/element/Range.js.map +1 -1
  158. package/lib/nodes/html-base-element/HTMLBaseElement.d.ts +42 -0
  159. package/lib/nodes/html-base-element/HTMLBaseElement.js +62 -0
  160. package/lib/nodes/html-base-element/HTMLBaseElement.js.map +1 -0
  161. package/lib/nodes/html-base-element/IHTMLBaseElement.d.ts +19 -0
  162. package/lib/nodes/html-base-element/IHTMLBaseElement.js +3 -0
  163. package/lib/nodes/html-base-element/IHTMLBaseElement.js.map +1 -0
  164. package/lib/nodes/html-document/HTMLDocument.js +3 -23
  165. package/lib/nodes/html-document/HTMLDocument.js.map +1 -1
  166. package/lib/nodes/html-element/DatasetUtility.js +9 -12
  167. package/lib/nodes/html-element/DatasetUtility.js.map +1 -1
  168. package/lib/nodes/html-element/HTMLElement.js +232 -290
  169. package/lib/nodes/html-element/HTMLElement.js.map +1 -1
  170. package/lib/nodes/html-form-element/HTMLFormElement.js +170 -235
  171. package/lib/nodes/html-form-element/HTMLFormElement.js.map +1 -1
  172. package/lib/nodes/html-image-element/HTMLImageElement.js +178 -237
  173. package/lib/nodes/html-image-element/HTMLImageElement.js.map +1 -1
  174. package/lib/nodes/html-image-element/Image.js +7 -27
  175. package/lib/nodes/html-image-element/Image.js.map +1 -1
  176. package/lib/nodes/html-input-element/HTMLInputElement.d.ts +17 -6
  177. package/lib/nodes/html-input-element/HTMLInputElement.js +719 -866
  178. package/lib/nodes/html-input-element/HTMLInputElement.js.map +1 -1
  179. package/lib/nodes/html-input-element/HTMLInputElementValueSanitizer.js +9 -12
  180. package/lib/nodes/html-input-element/HTMLInputElementValueSanitizer.js.map +1 -1
  181. package/lib/nodes/html-input-element/HTMLInputElementValueStepping.js +5 -8
  182. package/lib/nodes/html-input-element/HTMLInputElementValueStepping.js.map +1 -1
  183. package/lib/nodes/html-input-element/IHTMLInputElement.d.ts +11 -1
  184. package/lib/nodes/html-input-element/ValidityState.js +47 -69
  185. package/lib/nodes/html-input-element/ValidityState.js.map +1 -1
  186. package/lib/nodes/html-label-element/HTMLLabelElement.js +53 -87
  187. package/lib/nodes/html-label-element/HTMLLabelElement.js.map +1 -1
  188. package/lib/nodes/html-link-element/HTMLLinkElement.js +197 -252
  189. package/lib/nodes/html-link-element/HTMLLinkElement.js.map +1 -1
  190. package/lib/nodes/html-meta-element/HTMLMetaElement.js +66 -102
  191. package/lib/nodes/html-meta-element/HTMLMetaElement.js.map +1 -1
  192. package/lib/nodes/html-script-element/HTMLScriptElement.js +145 -193
  193. package/lib/nodes/html-script-element/HTMLScriptElement.js.map +1 -1
  194. package/lib/nodes/html-script-element/ScriptUtility.js +58 -112
  195. package/lib/nodes/html-script-element/ScriptUtility.js.map +1 -1
  196. package/lib/nodes/html-slot-element/HTMLSlotElement.js +33 -65
  197. package/lib/nodes/html-slot-element/HTMLSlotElement.js.map +1 -1
  198. package/lib/nodes/html-style-element/HTMLStyleElement.js +75 -109
  199. package/lib/nodes/html-style-element/HTMLStyleElement.js.map +1 -1
  200. package/lib/nodes/html-template-element/HTMLTemplateElement.js +60 -99
  201. package/lib/nodes/html-template-element/HTMLTemplateElement.js.map +1 -1
  202. package/lib/nodes/html-text-area-element/HTMLTextAreaElement.js +349 -444
  203. package/lib/nodes/html-text-area-element/HTMLTextAreaElement.js.map +1 -1
  204. package/lib/nodes/html-unknown-element/HTMLUnknownElement.js +17 -37
  205. package/lib/nodes/html-unknown-element/HTMLUnknownElement.js.map +1 -1
  206. package/lib/nodes/node/INode.d.ts +1 -0
  207. package/lib/nodes/node/Node.d.ts +6 -0
  208. package/lib/nodes/node/Node.js +193 -244
  209. package/lib/nodes/node/Node.js.map +1 -1
  210. package/lib/nodes/node/NodeList.js +4 -24
  211. package/lib/nodes/node/NodeList.js.map +1 -1
  212. package/lib/nodes/node/NodeListFactory.js +6 -9
  213. package/lib/nodes/node/NodeListFactory.js.map +1 -1
  214. package/lib/nodes/parent-node/ParentNodeUtility.js +43 -78
  215. package/lib/nodes/parent-node/ParentNodeUtility.js.map +1 -1
  216. package/lib/nodes/shadow-root/ShadowRoot.js +53 -83
  217. package/lib/nodes/shadow-root/ShadowRoot.js.map +1 -1
  218. package/lib/nodes/svg-document/SVGDocument.js +3 -23
  219. package/lib/nodes/svg-document/SVGDocument.js.map +1 -1
  220. package/lib/nodes/svg-element/DOMMatrix.js +3 -4
  221. package/lib/nodes/svg-element/DOMMatrix.js.map +1 -1
  222. package/lib/nodes/svg-element/SVGAngle.js +10 -11
  223. package/lib/nodes/svg-element/SVGAngle.js.map +1 -1
  224. package/lib/nodes/svg-element/SVGAnimatedRect.js +4 -5
  225. package/lib/nodes/svg-element/SVGAnimatedRect.js.map +1 -1
  226. package/lib/nodes/svg-element/SVGElement.js +58 -93
  227. package/lib/nodes/svg-element/SVGElement.js.map +1 -1
  228. package/lib/nodes/svg-element/SVGGraphicsElement.js +14 -32
  229. package/lib/nodes/svg-element/SVGGraphicsElement.js.map +1 -1
  230. package/lib/nodes/svg-element/SVGLength.js +16 -17
  231. package/lib/nodes/svg-element/SVGLength.js.map +1 -1
  232. package/lib/nodes/svg-element/SVGNumber.js +3 -4
  233. package/lib/nodes/svg-element/SVGNumber.js.map +1 -1
  234. package/lib/nodes/svg-element/SVGPoint.js +3 -4
  235. package/lib/nodes/svg-element/SVGPoint.js.map +1 -1
  236. package/lib/nodes/svg-element/SVGRect.js +3 -4
  237. package/lib/nodes/svg-element/SVGRect.js.map +1 -1
  238. package/lib/nodes/svg-element/SVGSVGElement.js +187 -248
  239. package/lib/nodes/svg-element/SVGSVGElement.js.map +1 -1
  240. package/lib/nodes/svg-element/SVGTransform.js +16 -17
  241. package/lib/nodes/svg-element/SVGTransform.js.map +1 -1
  242. package/lib/nodes/text/Text.js +20 -43
  243. package/lib/nodes/text/Text.js.map +1 -1
  244. package/lib/nodes/xml-document/XMLDocument.js +3 -23
  245. package/lib/nodes/xml-document/XMLDocument.js.map +1 -1
  246. package/lib/query-selector/QuerySelector.js +36 -44
  247. package/lib/query-selector/QuerySelector.js.map +1 -1
  248. package/lib/query-selector/SelectorItem.js +62 -66
  249. package/lib/query-selector/SelectorItem.js.map +1 -1
  250. package/lib/resize-observer/ResizeObserver.js +8 -11
  251. package/lib/resize-observer/ResizeObserver.js.map +1 -1
  252. package/lib/screen/Screen.js +3 -4
  253. package/lib/screen/Screen.js.map +1 -1
  254. package/lib/selection/Selection.js +29 -30
  255. package/lib/selection/Selection.js.map +1 -1
  256. package/lib/storage/Storage.js +22 -27
  257. package/lib/storage/Storage.js.map +1 -1
  258. package/lib/tree-walker/NodeFilterMask.js +1 -1
  259. package/lib/tree-walker/NodeFilterMask.js.map +1 -1
  260. package/lib/tree-walker/TreeWalker.js +30 -33
  261. package/lib/tree-walker/TreeWalker.js.map +1 -1
  262. package/lib/window/GlobalWindow.d.ts +84 -0
  263. package/lib/window/GlobalWindow.js +90 -0
  264. package/lib/window/GlobalWindow.js.map +1 -0
  265. package/lib/window/IWindow.d.ts +31 -18
  266. package/lib/window/VMGlobalPropertyScript.d.ts +2 -0
  267. package/lib/window/VMGlobalPropertyScript.js +65 -0
  268. package/lib/window/VMGlobalPropertyScript.js.map +1 -0
  269. package/lib/window/Window.d.ts +72 -105
  270. package/lib/window/Window.js +269 -489
  271. package/lib/window/Window.js.map +1 -1
  272. package/lib/xml-parser/XMLParser.js +65 -71
  273. package/lib/xml-parser/XMLParser.js.map +1 -1
  274. package/lib/xml-serializer/XMLSerializer.js +30 -37
  275. package/lib/xml-serializer/XMLSerializer.js.map +1 -1
  276. package/package.json +6 -7
  277. package/src/config/ElementTag.ts +2 -1
  278. package/src/config/NonImplemenetedElementClasses.ts +0 -1
  279. package/src/dom-parser/DOMParser.ts +4 -5
  280. package/src/event/IUIEventInit.ts +2 -2
  281. package/src/event/UIEvent.ts +2 -2
  282. package/src/fetch/FetchHandler.ts +3 -3
  283. package/src/fetch/ResourceFetchHandler.ts +3 -3
  284. package/src/index.ts +7 -3
  285. package/src/nodes/document/Document.ts +4 -4
  286. package/src/nodes/document/IDocument.ts +2 -2
  287. package/src/nodes/html-base-element/HTMLBaseElement.ts +61 -0
  288. package/src/nodes/html-base-element/IHTMLBaseElement.ts +21 -0
  289. package/src/nodes/html-input-element/HTMLInputElement.ts +37 -12
  290. package/src/nodes/html-input-element/IHTMLInputElement.ts +13 -1
  291. package/src/nodes/html-link-element/HTMLLinkElement.ts +8 -2
  292. package/src/nodes/html-script-element/ScriptUtility.ts +4 -4
  293. package/src/nodes/node/INode.ts +1 -0
  294. package/src/nodes/node/Node.ts +14 -0
  295. package/src/window/GlobalWindow.ts +82 -0
  296. package/src/window/IWindow.ts +26 -12
  297. package/src/window/VMGlobalPropertyScript.ts +62 -0
  298. package/src/window/Window.ts +106 -173
  299. package/tsconfig.json +1 -1
  300. package/lib/window/AsyncWindow.d.ts +0 -10
  301. package/lib/window/AsyncWindow.js +0 -38
  302. package/lib/window/AsyncWindow.js.map +0 -1
  303. package/src/window/AsyncWindow.ts +0 -17
@@ -1,32 +1,17 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
18
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
4
  };
20
5
  Object.defineProperty(exports, "__esModule", { value: true });
21
- var HTMLElement_1 = __importDefault(require("../html-element/HTMLElement"));
22
- var ValidityState_1 = __importDefault(require("./ValidityState"));
23
- var DOMException_1 = __importDefault(require("../../exception/DOMException"));
24
- var DOMExceptionNameEnum_1 = __importDefault(require("../../exception/DOMExceptionNameEnum"));
25
- var Event_1 = __importDefault(require("../../event/Event"));
26
- var HTMLInputElementValueSanitizer_1 = __importDefault(require("./HTMLInputElementValueSanitizer"));
27
- var HTMLInputElementSelectionModeEnum_1 = __importDefault(require("./HTMLInputElementSelectionModeEnum"));
28
- var HTMLInputElementSelectionDirectionEnum_1 = __importDefault(require("./HTMLInputElementSelectionDirectionEnum"));
29
- var HTMLInputElementValueStepping_1 = __importDefault(require("./HTMLInputElementValueStepping"));
6
+ const HTMLElement_1 = __importDefault(require("../html-element/HTMLElement"));
7
+ const ValidityState_1 = __importDefault(require("./ValidityState"));
8
+ const DOMException_1 = __importDefault(require("../../exception/DOMException"));
9
+ const DOMExceptionNameEnum_1 = __importDefault(require("../../exception/DOMExceptionNameEnum"));
10
+ const Event_1 = __importDefault(require("../../event/Event"));
11
+ const HTMLInputElementValueSanitizer_1 = __importDefault(require("./HTMLInputElementValueSanitizer"));
12
+ const HTMLInputElementSelectionModeEnum_1 = __importDefault(require("./HTMLInputElementSelectionModeEnum"));
13
+ const HTMLInputElementSelectionDirectionEnum_1 = __importDefault(require("./HTMLInputElementSelectionDirectionEnum"));
14
+ const HTMLInputElementValueStepping_1 = __importDefault(require("./HTMLInputElementValueStepping"));
30
15
  /**
31
16
  * HTML Input Element.
32
17
  *
@@ -36,826 +21,700 @@ var HTMLInputElementValueStepping_1 = __importDefault(require("./HTMLInputElemen
36
21
  * Used as reference for some of the logic (like selection range):
37
22
  * https://github.com/jsdom/jsdom/blob/master/lib/jsdom/living/nodes/nodes/HTMLInputElement-impl.js (MIT licensed).
38
23
  */
39
- var HTMLInputElement = /** @class */ (function (_super) {
40
- __extends(HTMLInputElement, _super);
41
- function HTMLInputElement() {
42
- var _this = _super !== null && _super.apply(this, arguments) || this;
24
+ class HTMLInputElement extends HTMLElement_1.default {
25
+ constructor() {
26
+ super(...arguments);
43
27
  // Related to parent form.
44
- _this.formAction = '';
45
- _this.formMethod = '';
46
- _this.formNoValidate = false;
28
+ this.formAction = '';
29
+ this.formMethod = '';
30
+ this.formNoValidate = false;
47
31
  // Any type of input
48
- _this._value = null;
49
- _this._height = 0;
50
- _this._width = 0;
32
+ this._value = null;
33
+ this._height = 0;
34
+ this._width = 0;
51
35
  // Type specific: checkbox/radio
52
- _this.defaultChecked = false;
36
+ this.defaultChecked = false;
53
37
  // Type specific: file
54
- _this.files = [];
38
+ this.files = [];
55
39
  // Type specific: text/password/search/tel/url/week/month
56
- _this._selectionStart = null;
57
- _this._selectionEnd = null;
58
- _this._selectionDirection = HTMLInputElementSelectionDirectionEnum_1.default.none;
59
- return _this;
60
- }
61
- Object.defineProperty(HTMLInputElement.prototype, "height", {
62
- /**
63
- * Returns height.
64
- *
65
- * @returns Height.
66
- */
67
- get: function () {
68
- return this._height;
69
- },
70
- /**
71
- * Sets height.
72
- *
73
- * @param height Height.
74
- */
75
- set: function (height) {
76
- this._height = height;
77
- this.setAttributeNS(null, 'height', String(height));
78
- },
79
- enumerable: false,
80
- configurable: true
81
- });
82
- Object.defineProperty(HTMLInputElement.prototype, "width", {
83
- /**
84
- * Returns width.
85
- *
86
- * @returns Width.
87
- */
88
- get: function () {
89
- return this._width;
90
- },
91
- /**
92
- * Sets width.
93
- *
94
- * @param width Width.
95
- */
96
- set: function (width) {
97
- this._width = width;
98
- this.setAttributeNS(null, 'width', String(width));
99
- },
100
- enumerable: false,
101
- configurable: true
102
- });
103
- Object.defineProperty(HTMLInputElement.prototype, "size", {
104
- /**
105
- * Returns size.
106
- *
107
- * @returns Size.
108
- */
109
- get: function () {
110
- var size = this.getAttributeNS(null, 'size');
111
- if (size !== null) {
112
- return parseInt(size);
113
- }
114
- return 20;
115
- },
116
- /**
117
- * Sets size.
118
- *
119
- * @param size Size.
120
- */
121
- set: function (size) {
122
- this.setAttributeNS(null, 'size', String(size));
123
- },
124
- enumerable: false,
125
- configurable: true
126
- });
127
- Object.defineProperty(HTMLInputElement.prototype, "minLength", {
128
- /**
129
- * Returns minlength.
130
- *
131
- * @returns Min length.
132
- */
133
- get: function () {
134
- var minLength = this.getAttributeNS(null, 'minlength');
135
- if (minLength !== null) {
136
- return parseInt(minLength);
137
- }
138
- return -1;
139
- },
140
- /**
141
- * Sets minlength.
142
- *
143
- * @param minLength Min length.
144
- */
145
- set: function (minlength) {
146
- this.setAttributeNS(null, 'minlength', String(minlength));
147
- },
148
- enumerable: false,
149
- configurable: true
150
- });
151
- Object.defineProperty(HTMLInputElement.prototype, "maxLength", {
152
- /**
153
- * Returns maxlength.
154
- *
155
- * @returns Max length.
156
- */
157
- get: function () {
158
- var maxLength = this.getAttributeNS(null, 'maxlength');
159
- if (maxLength !== null) {
160
- return parseInt(maxLength);
161
- }
162
- return -1;
163
- },
164
- /**
165
- * Sets maxlength.
166
- *
167
- * @param maxlength Max length.
168
- */
169
- set: function (maxLength) {
170
- this.setAttributeNS(null, 'maxlength', String(maxLength));
171
- },
172
- enumerable: false,
173
- configurable: true
174
- });
175
- Object.defineProperty(HTMLInputElement.prototype, "type", {
176
- /**
177
- * Returns type.
178
- *
179
- * @returns Type. Defaults to "text".
180
- */
181
- get: function () {
182
- return this.getAttributeNS(null, 'type') || 'text';
183
- },
184
- /**
185
- * Sets type.
186
- *
187
- * @param type Type.
188
- */
189
- set: function (type) {
190
- this.setAttributeNS(null, 'type', type.toLowerCase());
191
- },
192
- enumerable: false,
193
- configurable: true
194
- });
195
- Object.defineProperty(HTMLInputElement.prototype, "name", {
196
- /**
197
- * Returns name.
198
- *
199
- * @returns Name.
200
- */
201
- get: function () {
202
- return this.getAttributeNS(null, 'name') || '';
203
- },
204
- /**
205
- * Sets name.
206
- *
207
- * @param name Name.
208
- */
209
- set: function (name) {
210
- this.setAttributeNS(null, 'name', name);
211
- },
212
- enumerable: false,
213
- configurable: true
214
- });
215
- Object.defineProperty(HTMLInputElement.prototype, "alt", {
216
- /**
217
- * Returns alt.
218
- *
219
- * @returns Alt.
220
- */
221
- get: function () {
222
- return this.getAttributeNS(null, 'alt') || '';
223
- },
224
- /**
225
- * Sets alt.
226
- *
227
- * @param alt Alt.
228
- */
229
- set: function (alt) {
230
- this.setAttributeNS(null, 'alt', alt);
231
- },
232
- enumerable: false,
233
- configurable: true
234
- });
235
- Object.defineProperty(HTMLInputElement.prototype, "min", {
236
- /**
237
- * Returns min.
238
- *
239
- * @returns Min.
240
- */
241
- get: function () {
242
- return this.getAttributeNS(null, 'min') || '';
243
- },
244
- /**
245
- * Sets min.
246
- *
247
- * @param min Min.
248
- */
249
- set: function (min) {
250
- this.setAttributeNS(null, 'min', min);
251
- },
252
- enumerable: false,
253
- configurable: true
254
- });
255
- Object.defineProperty(HTMLInputElement.prototype, "max", {
256
- /**
257
- * Returns max.
258
- *
259
- * @returns Max.
260
- */
261
- get: function () {
262
- return this.getAttributeNS(null, 'max') || '';
263
- },
264
- /**
265
- * Sets max.
266
- *
267
- * @param max Max.
268
- */
269
- set: function (max) {
270
- this.setAttributeNS(null, 'max', max);
271
- },
272
- enumerable: false,
273
- configurable: true
274
- });
275
- Object.defineProperty(HTMLInputElement.prototype, "pattern", {
276
- /**
277
- * Returns pattern.
278
- *
279
- * @returns Pattern.
280
- */
281
- get: function () {
282
- return this.getAttributeNS(null, 'pattern') || '';
283
- },
284
- /**
285
- * Sets pattern.
286
- *
287
- * @param pattern Pattern.
288
- */
289
- set: function (pattern) {
290
- this.setAttributeNS(null, 'pattern', pattern);
291
- },
292
- enumerable: false,
293
- configurable: true
294
- });
295
- Object.defineProperty(HTMLInputElement.prototype, "placeholder", {
296
- /**
297
- * Returns placeholder.
298
- *
299
- * @returns Placeholder.
300
- */
301
- get: function () {
302
- return this.getAttributeNS(null, 'placeholder') || '';
303
- },
304
- /**
305
- * Sets placeholder.
306
- *
307
- * @param placeholder Placeholder.
308
- */
309
- set: function (placeholder) {
310
- this.setAttributeNS(null, 'placeholder', placeholder);
311
- },
312
- enumerable: false,
313
- configurable: true
314
- });
315
- Object.defineProperty(HTMLInputElement.prototype, "step", {
316
- /**
317
- * Returns step.
318
- *
319
- * @returns Step.
320
- */
321
- get: function () {
322
- return this.getAttributeNS(null, 'step') || '';
323
- },
324
- /**
325
- * Sets step.
326
- *
327
- * @param step Step.
328
- */
329
- set: function (step) {
330
- this.setAttributeNS(null, 'step', step);
331
- },
332
- enumerable: false,
333
- configurable: true
334
- });
335
- Object.defineProperty(HTMLInputElement.prototype, "inputmode", {
336
- /**
337
- * Returns inputmode.
338
- *
339
- * @returns Inputmode.
340
- */
341
- get: function () {
342
- return this.getAttributeNS(null, 'inputmode') || '';
343
- },
344
- /**
345
- * Sets inputmode.
346
- *
347
- * @param inputmode Inputmode.
348
- */
349
- set: function (inputmode) {
350
- this.setAttributeNS(null, 'inputmode', inputmode);
351
- },
352
- enumerable: false,
353
- configurable: true
354
- });
355
- Object.defineProperty(HTMLInputElement.prototype, "accept", {
356
- /**
357
- * Returns accept.
358
- *
359
- * @returns Accept.
360
- */
361
- get: function () {
362
- return this.getAttributeNS(null, 'accept') || '';
363
- },
364
- /**
365
- * Sets accept.
366
- *
367
- * @param accept Accept.
368
- */
369
- set: function (accept) {
370
- this.setAttributeNS(null, 'accept', accept);
371
- },
372
- enumerable: false,
373
- configurable: true
374
- });
375
- Object.defineProperty(HTMLInputElement.prototype, "allowdirs", {
376
- /**
377
- * Returns allowdirs.
378
- *
379
- * @returns Allowdirs.
380
- */
381
- get: function () {
382
- return this.getAttributeNS(null, 'allowdirs') || '';
383
- },
384
- /**
385
- * Sets allowdirs.
386
- *
387
- * @param allowdirs Allowdirs.
388
- */
389
- set: function (allowdirs) {
390
- this.setAttributeNS(null, 'allowdirs', allowdirs);
391
- },
392
- enumerable: false,
393
- configurable: true
394
- });
395
- Object.defineProperty(HTMLInputElement.prototype, "autocomplete", {
396
- /**
397
- * Returns autocomplete.
398
- *
399
- * @returns Autocomplete.
400
- */
401
- get: function () {
402
- return this.getAttributeNS(null, 'autocomplete') || '';
403
- },
404
- /**
405
- * Sets autocomplete.
406
- *
407
- * @param autocomplete Autocomplete.
408
- */
409
- set: function (autocomplete) {
410
- this.setAttributeNS(null, 'autocomplete', autocomplete);
411
- },
412
- enumerable: false,
413
- configurable: true
414
- });
415
- Object.defineProperty(HTMLInputElement.prototype, "src", {
416
- /**
417
- * Returns src.
418
- *
419
- * @returns Src.
420
- */
421
- get: function () {
422
- return this.getAttributeNS(null, 'src') || '';
423
- },
424
- /**
425
- * Sets src.
426
- *
427
- * @param src Src.
428
- */
429
- set: function (src) {
430
- this.setAttributeNS(null, 'src', src);
431
- },
432
- enumerable: false,
433
- configurable: true
434
- });
435
- Object.defineProperty(HTMLInputElement.prototype, "defaultValue", {
436
- /**
437
- * Returns defaultValue.
438
- *
439
- * @returns Defaultvalue.
440
- */
441
- get: function () {
442
- return this.getAttributeNS(null, 'defaultvalue') || '';
443
- },
444
- /**
445
- * Sets defaultValue.
446
- *
447
- * @param defaultValue Defaultvalue.
448
- */
449
- set: function (defaultValue) {
450
- this.setAttributeNS(null, 'defaultvalue', defaultValue);
451
- },
452
- enumerable: false,
453
- configurable: true
454
- });
455
- Object.defineProperty(HTMLInputElement.prototype, "readOnly", {
456
- /**
457
- * Returns read only.
458
- *
459
- * @returns Read only.
460
- */
461
- get: function () {
462
- return this.getAttributeNS(null, 'readonly') !== null;
463
- },
464
- /**
465
- * Sets read only.
466
- *
467
- * @param readOnly Read only.
468
- */
469
- set: function (readOnly) {
470
- if (!readOnly) {
471
- this.removeAttributeNS(null, 'readonly');
472
- }
473
- else {
474
- this.setAttributeNS(null, 'readonly', '');
475
- }
476
- },
477
- enumerable: false,
478
- configurable: true
479
- });
480
- Object.defineProperty(HTMLInputElement.prototype, "disabled", {
481
- /**
482
- * Returns disabled.
483
- *
484
- * @returns Disabled.
485
- */
486
- get: function () {
487
- return this.getAttributeNS(null, 'disabled') !== null;
488
- },
489
- /**
490
- * Sets disabled.
491
- *
492
- * @param disabled Disabled.
493
- */
494
- set: function (disabled) {
495
- if (!disabled) {
496
- this.removeAttributeNS(null, 'disabled');
497
- }
498
- else {
499
- this.setAttributeNS(null, 'disabled', '');
500
- }
501
- },
502
- enumerable: false,
503
- configurable: true
504
- });
505
- Object.defineProperty(HTMLInputElement.prototype, "autofocus", {
506
- /**
507
- * Returns autofocus.
508
- *
509
- * @returns Autofocus.
510
- */
511
- get: function () {
512
- return this.getAttributeNS(null, 'autofocus') !== null;
513
- },
514
- /**
515
- * Sets autofocus.
516
- *
517
- * @param autofocus Autofocus.
518
- */
519
- set: function (autofocus) {
520
- if (!autofocus) {
521
- this.removeAttributeNS(null, 'autofocus');
522
- }
523
- else {
524
- this.setAttributeNS(null, 'autofocus', '');
525
- }
526
- },
527
- enumerable: false,
528
- configurable: true
529
- });
530
- Object.defineProperty(HTMLInputElement.prototype, "required", {
531
- /**
532
- * Returns required.
533
- *
534
- * @returns Required.
535
- */
536
- get: function () {
537
- return this.getAttributeNS(null, 'required') !== null;
538
- },
539
- /**
540
- * Sets required.
541
- *
542
- * @param required Required.
543
- */
544
- set: function (required) {
545
- if (!required) {
546
- this.removeAttributeNS(null, 'required');
547
- }
548
- else {
549
- this.setAttributeNS(null, 'required', '');
550
- }
551
- },
552
- enumerable: false,
553
- configurable: true
554
- });
555
- Object.defineProperty(HTMLInputElement.prototype, "indeterminate", {
556
- /**
557
- * Returns indeterminate.
558
- *
559
- * @returns Indeterminate.
560
- */
561
- get: function () {
562
- return this.getAttributeNS(null, 'indeterminate') !== null;
563
- },
564
- /**
565
- * Sets indeterminate.
566
- *
567
- * @param indeterminate Indeterminate.
568
- */
569
- set: function (indeterminate) {
570
- if (!indeterminate) {
571
- this.removeAttributeNS(null, 'indeterminate');
572
- }
573
- else {
574
- this.setAttributeNS(null, 'indeterminate', '');
575
- }
576
- },
577
- enumerable: false,
578
- configurable: true
579
- });
580
- Object.defineProperty(HTMLInputElement.prototype, "multiple", {
581
- /**
582
- * Returns multiple.
583
- *
584
- * @returns Multiple.
585
- */
586
- get: function () {
587
- return this.getAttributeNS(null, 'multiple') !== null;
588
- },
589
- /**
590
- * Sets multiple.
591
- *
592
- * @param multiple Multiple.
593
- */
594
- set: function (multiple) {
595
- if (!multiple) {
596
- this.removeAttributeNS(null, 'multiple');
597
- }
598
- else {
599
- this.setAttributeNS(null, 'multiple', '');
600
- }
601
- },
602
- enumerable: false,
603
- configurable: true
604
- });
605
- Object.defineProperty(HTMLInputElement.prototype, "checked", {
606
- /**
607
- * Returns checked.
608
- *
609
- * @returns Checked.
610
- */
611
- get: function () {
612
- return this.getAttributeNS(null, 'checked') !== null;
613
- },
614
- /**
615
- * Sets checked.
616
- *
617
- * @param checked Checked.
618
- */
619
- set: function (checked) {
620
- if (!checked) {
621
- this.removeAttributeNS(null, 'checked');
622
- }
623
- else {
624
- this.setAttributeNS(null, 'checked', '');
625
- }
626
- },
627
- enumerable: false,
628
- configurable: true
629
- });
630
- Object.defineProperty(HTMLInputElement.prototype, "value", {
631
- /**
632
- * Returns value.
633
- *
634
- * @returns Value.
635
- */
636
- get: function () {
637
- switch (this.type) {
638
- case 'hidden':
639
- case 'submit':
640
- case 'image':
641
- case 'reset':
642
- case 'button':
643
- return this.getAttributeNS(null, 'value') || '';
644
- case 'checkbox':
645
- case 'radio':
646
- var attritube = this.getAttributeNS(null, 'value');
647
- return attritube !== null ? attritube : 'on';
648
- case 'file':
649
- return this.files.length > 0 ? '/fake/path/' + this.files[0].name : '';
650
- }
651
- if (this._value === null) {
40
+ this._selectionStart = null;
41
+ this._selectionEnd = null;
42
+ this._selectionDirection = HTMLInputElementSelectionDirectionEnum_1.default.none;
43
+ this._validationMessage = '';
44
+ }
45
+ /**
46
+ * Returns height.
47
+ *
48
+ * @returns Height.
49
+ */
50
+ get height() {
51
+ return this._height;
52
+ }
53
+ /**
54
+ * Sets height.
55
+ *
56
+ * @param height Height.
57
+ */
58
+ set height(height) {
59
+ this._height = height;
60
+ this.setAttributeNS(null, 'height', String(height));
61
+ }
62
+ /**
63
+ * Returns width.
64
+ *
65
+ * @returns Width.
66
+ */
67
+ get width() {
68
+ return this._width;
69
+ }
70
+ /**
71
+ * Sets width.
72
+ *
73
+ * @param width Width.
74
+ */
75
+ set width(width) {
76
+ this._width = width;
77
+ this.setAttributeNS(null, 'width', String(width));
78
+ }
79
+ /**
80
+ * Returns size.
81
+ *
82
+ * @returns Size.
83
+ */
84
+ get size() {
85
+ const size = this.getAttributeNS(null, 'size');
86
+ if (size !== null) {
87
+ return parseInt(size);
88
+ }
89
+ return 20;
90
+ }
91
+ /**
92
+ * Sets size.
93
+ *
94
+ * @param size Size.
95
+ */
96
+ set size(size) {
97
+ this.setAttributeNS(null, 'size', String(size));
98
+ }
99
+ /**
100
+ * Returns minlength.
101
+ *
102
+ * @returns Min length.
103
+ */
104
+ get minLength() {
105
+ const minLength = this.getAttributeNS(null, 'minlength');
106
+ if (minLength !== null) {
107
+ return parseInt(minLength);
108
+ }
109
+ return -1;
110
+ }
111
+ /**
112
+ * Sets minlength.
113
+ *
114
+ * @param minLength Min length.
115
+ */
116
+ set minLength(minlength) {
117
+ this.setAttributeNS(null, 'minlength', String(minlength));
118
+ }
119
+ /**
120
+ * Returns maxlength.
121
+ *
122
+ * @returns Max length.
123
+ */
124
+ get maxLength() {
125
+ const maxLength = this.getAttributeNS(null, 'maxlength');
126
+ if (maxLength !== null) {
127
+ return parseInt(maxLength);
128
+ }
129
+ return -1;
130
+ }
131
+ /**
132
+ * Sets maxlength.
133
+ *
134
+ * @param maxlength Max length.
135
+ */
136
+ set maxLength(maxLength) {
137
+ this.setAttributeNS(null, 'maxlength', String(maxLength));
138
+ }
139
+ /**
140
+ * Returns type.
141
+ *
142
+ * @returns Type. Defaults to "text".
143
+ */
144
+ get type() {
145
+ return this.getAttributeNS(null, 'type') || 'text';
146
+ }
147
+ /**
148
+ * Sets type.
149
+ *
150
+ * @param type Type.
151
+ */
152
+ set type(type) {
153
+ this.setAttributeNS(null, 'type', type.toLowerCase());
154
+ }
155
+ /**
156
+ * Returns name.
157
+ *
158
+ * @returns Name.
159
+ */
160
+ get name() {
161
+ return this.getAttributeNS(null, 'name') || '';
162
+ }
163
+ /**
164
+ * Sets name.
165
+ *
166
+ * @param name Name.
167
+ */
168
+ set name(name) {
169
+ this.setAttributeNS(null, 'name', name);
170
+ }
171
+ /**
172
+ * Returns alt.
173
+ *
174
+ * @returns Alt.
175
+ */
176
+ get alt() {
177
+ return this.getAttributeNS(null, 'alt') || '';
178
+ }
179
+ /**
180
+ * Sets alt.
181
+ *
182
+ * @param alt Alt.
183
+ */
184
+ set alt(alt) {
185
+ this.setAttributeNS(null, 'alt', alt);
186
+ }
187
+ /**
188
+ * Returns min.
189
+ *
190
+ * @returns Min.
191
+ */
192
+ get min() {
193
+ return this.getAttributeNS(null, 'min') || '';
194
+ }
195
+ /**
196
+ * Sets min.
197
+ *
198
+ * @param min Min.
199
+ */
200
+ set min(min) {
201
+ this.setAttributeNS(null, 'min', min);
202
+ }
203
+ /**
204
+ * Returns max.
205
+ *
206
+ * @returns Max.
207
+ */
208
+ get max() {
209
+ return this.getAttributeNS(null, 'max') || '';
210
+ }
211
+ /**
212
+ * Sets max.
213
+ *
214
+ * @param max Max.
215
+ */
216
+ set max(max) {
217
+ this.setAttributeNS(null, 'max', max);
218
+ }
219
+ /**
220
+ * Returns pattern.
221
+ *
222
+ * @returns Pattern.
223
+ */
224
+ get pattern() {
225
+ return this.getAttributeNS(null, 'pattern') || '';
226
+ }
227
+ /**
228
+ * Sets pattern.
229
+ *
230
+ * @param pattern Pattern.
231
+ */
232
+ set pattern(pattern) {
233
+ this.setAttributeNS(null, 'pattern', pattern);
234
+ }
235
+ /**
236
+ * Returns placeholder.
237
+ *
238
+ * @returns Placeholder.
239
+ */
240
+ get placeholder() {
241
+ return this.getAttributeNS(null, 'placeholder') || '';
242
+ }
243
+ /**
244
+ * Sets placeholder.
245
+ *
246
+ * @param placeholder Placeholder.
247
+ */
248
+ set placeholder(placeholder) {
249
+ this.setAttributeNS(null, 'placeholder', placeholder);
250
+ }
251
+ /**
252
+ * Returns step.
253
+ *
254
+ * @returns Step.
255
+ */
256
+ get step() {
257
+ return this.getAttributeNS(null, 'step') || '';
258
+ }
259
+ /**
260
+ * Sets step.
261
+ *
262
+ * @param step Step.
263
+ */
264
+ set step(step) {
265
+ this.setAttributeNS(null, 'step', step);
266
+ }
267
+ /**
268
+ * Returns inputmode.
269
+ *
270
+ * @returns Inputmode.
271
+ */
272
+ get inputmode() {
273
+ return this.getAttributeNS(null, 'inputmode') || '';
274
+ }
275
+ /**
276
+ * Sets inputmode.
277
+ *
278
+ * @param inputmode Inputmode.
279
+ */
280
+ set inputmode(inputmode) {
281
+ this.setAttributeNS(null, 'inputmode', inputmode);
282
+ }
283
+ /**
284
+ * Returns accept.
285
+ *
286
+ * @returns Accept.
287
+ */
288
+ get accept() {
289
+ return this.getAttributeNS(null, 'accept') || '';
290
+ }
291
+ /**
292
+ * Sets accept.
293
+ *
294
+ * @param accept Accept.
295
+ */
296
+ set accept(accept) {
297
+ this.setAttributeNS(null, 'accept', accept);
298
+ }
299
+ /**
300
+ * Returns allowdirs.
301
+ *
302
+ * @returns Allowdirs.
303
+ */
304
+ get allowdirs() {
305
+ return this.getAttributeNS(null, 'allowdirs') || '';
306
+ }
307
+ /**
308
+ * Sets allowdirs.
309
+ *
310
+ * @param allowdirs Allowdirs.
311
+ */
312
+ set allowdirs(allowdirs) {
313
+ this.setAttributeNS(null, 'allowdirs', allowdirs);
314
+ }
315
+ /**
316
+ * Returns autocomplete.
317
+ *
318
+ * @returns Autocomplete.
319
+ */
320
+ get autocomplete() {
321
+ return this.getAttributeNS(null, 'autocomplete') || '';
322
+ }
323
+ /**
324
+ * Sets autocomplete.
325
+ *
326
+ * @param autocomplete Autocomplete.
327
+ */
328
+ set autocomplete(autocomplete) {
329
+ this.setAttributeNS(null, 'autocomplete', autocomplete);
330
+ }
331
+ /**
332
+ * Returns src.
333
+ *
334
+ * @returns Src.
335
+ */
336
+ get src() {
337
+ return this.getAttributeNS(null, 'src') || '';
338
+ }
339
+ /**
340
+ * Sets src.
341
+ *
342
+ * @param src Src.
343
+ */
344
+ set src(src) {
345
+ this.setAttributeNS(null, 'src', src);
346
+ }
347
+ /**
348
+ * Returns defaultValue.
349
+ *
350
+ * @returns Defaultvalue.
351
+ */
352
+ get defaultValue() {
353
+ return this.getAttributeNS(null, 'defaultvalue') || '';
354
+ }
355
+ /**
356
+ * Sets defaultValue.
357
+ *
358
+ * @param defaultValue Defaultvalue.
359
+ */
360
+ set defaultValue(defaultValue) {
361
+ this.setAttributeNS(null, 'defaultvalue', defaultValue);
362
+ }
363
+ /**
364
+ * Returns read only.
365
+ *
366
+ * @returns Read only.
367
+ */
368
+ get readOnly() {
369
+ return this.getAttributeNS(null, 'readonly') !== null;
370
+ }
371
+ /**
372
+ * Sets read only.
373
+ *
374
+ * @param readOnly Read only.
375
+ */
376
+ set readOnly(readOnly) {
377
+ if (!readOnly) {
378
+ this.removeAttributeNS(null, 'readonly');
379
+ }
380
+ else {
381
+ this.setAttributeNS(null, 'readonly', '');
382
+ }
383
+ }
384
+ /**
385
+ * Returns disabled.
386
+ *
387
+ * @returns Disabled.
388
+ */
389
+ get disabled() {
390
+ return this.getAttributeNS(null, 'disabled') !== null;
391
+ }
392
+ /**
393
+ * Sets disabled.
394
+ *
395
+ * @param disabled Disabled.
396
+ */
397
+ set disabled(disabled) {
398
+ if (!disabled) {
399
+ this.removeAttributeNS(null, 'disabled');
400
+ }
401
+ else {
402
+ this.setAttributeNS(null, 'disabled', '');
403
+ }
404
+ }
405
+ /**
406
+ * Returns autofocus.
407
+ *
408
+ * @returns Autofocus.
409
+ */
410
+ get autofocus() {
411
+ return this.getAttributeNS(null, 'autofocus') !== null;
412
+ }
413
+ /**
414
+ * Sets autofocus.
415
+ *
416
+ * @param autofocus Autofocus.
417
+ */
418
+ set autofocus(autofocus) {
419
+ if (!autofocus) {
420
+ this.removeAttributeNS(null, 'autofocus');
421
+ }
422
+ else {
423
+ this.setAttributeNS(null, 'autofocus', '');
424
+ }
425
+ }
426
+ /**
427
+ * Returns required.
428
+ *
429
+ * @returns Required.
430
+ */
431
+ get required() {
432
+ return this.getAttributeNS(null, 'required') !== null;
433
+ }
434
+ /**
435
+ * Sets required.
436
+ *
437
+ * @param required Required.
438
+ */
439
+ set required(required) {
440
+ if (!required) {
441
+ this.removeAttributeNS(null, 'required');
442
+ }
443
+ else {
444
+ this.setAttributeNS(null, 'required', '');
445
+ }
446
+ }
447
+ /**
448
+ * Returns indeterminate.
449
+ *
450
+ * @returns Indeterminate.
451
+ */
452
+ get indeterminate() {
453
+ return this.getAttributeNS(null, 'indeterminate') !== null;
454
+ }
455
+ /**
456
+ * Sets indeterminate.
457
+ *
458
+ * @param indeterminate Indeterminate.
459
+ */
460
+ set indeterminate(indeterminate) {
461
+ if (!indeterminate) {
462
+ this.removeAttributeNS(null, 'indeterminate');
463
+ }
464
+ else {
465
+ this.setAttributeNS(null, 'indeterminate', '');
466
+ }
467
+ }
468
+ /**
469
+ * Returns multiple.
470
+ *
471
+ * @returns Multiple.
472
+ */
473
+ get multiple() {
474
+ return this.getAttributeNS(null, 'multiple') !== null;
475
+ }
476
+ /**
477
+ * Sets multiple.
478
+ *
479
+ * @param multiple Multiple.
480
+ */
481
+ set multiple(multiple) {
482
+ if (!multiple) {
483
+ this.removeAttributeNS(null, 'multiple');
484
+ }
485
+ else {
486
+ this.setAttributeNS(null, 'multiple', '');
487
+ }
488
+ }
489
+ /**
490
+ * Returns checked.
491
+ *
492
+ * @returns Checked.
493
+ */
494
+ get checked() {
495
+ return this.getAttributeNS(null, 'checked') !== null;
496
+ }
497
+ /**
498
+ * Sets checked.
499
+ *
500
+ * @param checked Checked.
501
+ */
502
+ set checked(checked) {
503
+ if (!checked) {
504
+ this.removeAttributeNS(null, 'checked');
505
+ }
506
+ else {
507
+ this.setAttributeNS(null, 'checked', '');
508
+ }
509
+ }
510
+ /**
511
+ * Returns value.
512
+ *
513
+ * @returns Value.
514
+ */
515
+ get value() {
516
+ switch (this.type) {
517
+ case 'hidden':
518
+ case 'submit':
519
+ case 'image':
520
+ case 'reset':
521
+ case 'button':
652
522
  return this.getAttributeNS(null, 'value') || '';
653
- }
654
- return this._value;
655
- },
656
- /**
657
- * Sets value.
658
- *
659
- * @param value Value.
660
- */
661
- set: function (value) {
662
- switch (this.type) {
663
- case 'hidden':
664
- case 'submit':
665
- case 'image':
666
- case 'reset':
667
- case 'button':
668
- case 'checkbox':
669
- case 'radio':
670
- this.setAttributeNS(null, 'value', value);
671
- break;
672
- case 'file':
673
- if (value !== '') {
674
- throw new DOMException_1.default('Input elements of type "file" may only programmatically set the value to empty string.', DOMExceptionNameEnum_1.default.invalidStateError);
675
- }
676
- break;
677
- default:
678
- var oldValue = this._value;
679
- this._value = HTMLInputElementValueSanitizer_1.default.sanitize(this, value);
680
- if (oldValue !== this._value) {
681
- this._selectionStart = this._value.length;
682
- this._selectionEnd = this._value.length;
683
- this._selectionDirection = HTMLInputElementSelectionDirectionEnum_1.default.none;
684
- }
685
- break;
686
- }
687
- },
688
- enumerable: false,
689
- configurable: true
690
- });
691
- Object.defineProperty(HTMLInputElement.prototype, "selectionStart", {
692
- /**
693
- * Returns selection start.
694
- *
695
- * @returns Selection start.
696
- */
697
- get: function () {
698
- if (!this._isSelectionSupported()) {
699
- return null;
700
- }
701
- if (this._selectionStart === null) {
702
- return this.value.length;
703
- }
704
- return this._selectionStart;
705
- },
706
- /**
707
- * Sets selection start.
708
- *
709
- * @param start Start.
710
- */
711
- set: function (start) {
712
- if (!this._isSelectionSupported()) {
713
- throw new DOMException_1.default("The input element's type (".concat(this.type, ") does not support selection."), DOMExceptionNameEnum_1.default.invalidStateError);
714
- }
715
- this.setSelectionRange(start, Math.max(start, this.selectionEnd), this._selectionDirection);
716
- },
717
- enumerable: false,
718
- configurable: true
719
- });
720
- Object.defineProperty(HTMLInputElement.prototype, "selectionEnd", {
721
- /**
722
- * Returns selection end.
723
- *
724
- * @returns Selection end.
725
- */
726
- get: function () {
727
- if (!this._isSelectionSupported()) {
728
- return null;
729
- }
730
- if (this._selectionEnd === null) {
731
- return this.value.length;
732
- }
733
- return this._selectionEnd;
734
- },
735
- /**
736
- * Sets selection end.
737
- *
738
- * @param end End.
739
- */
740
- set: function (end) {
741
- if (!this._isSelectionSupported()) {
742
- throw new DOMException_1.default("The input element's type (".concat(this.type, ") does not support selection."), DOMExceptionNameEnum_1.default.invalidStateError);
743
- }
744
- this.setSelectionRange(this.selectionStart, end, this._selectionDirection);
745
- },
746
- enumerable: false,
747
- configurable: true
748
- });
749
- Object.defineProperty(HTMLInputElement.prototype, "selectionDirection", {
750
- /**
751
- * Returns selection direction.
752
- *
753
- * @returns Selection direction.
754
- */
755
- get: function () {
756
- if (!this._isSelectionSupported()) {
757
- return null;
758
- }
759
- return this._selectionDirection;
760
- },
761
- /**
762
- * Sets selection direction.
763
- *
764
- * @param direction Direction.
765
- */
766
- set: function (direction) {
767
- if (!this._isSelectionSupported()) {
768
- throw new DOMException_1.default("The input element's type (".concat(this.type, ") does not support selection."), DOMExceptionNameEnum_1.default.invalidStateError);
769
- }
770
- this.setSelectionRange(this._selectionStart, this._selectionEnd, direction);
771
- },
772
- enumerable: false,
773
- configurable: true
774
- });
775
- Object.defineProperty(HTMLInputElement.prototype, "form", {
776
- /**
777
- * Returns the parent form element.
778
- *
779
- * @returns Form.
780
- */
781
- get: function () {
782
- var parent = this.parentNode;
783
- while (parent && parent.tagName !== 'FORM') {
784
- parent = parent.parentNode;
785
- }
786
- return parent;
787
- },
788
- enumerable: false,
789
- configurable: true
790
- });
791
- Object.defineProperty(HTMLInputElement.prototype, "validity", {
792
- /**
793
- * Returns validity state.
794
- *
795
- * @returns Validity state.
796
- */
797
- get: function () {
798
- return new ValidityState_1.default(this);
799
- },
800
- enumerable: false,
801
- configurable: true
802
- });
803
- Object.defineProperty(HTMLInputElement.prototype, "validationMessage", {
804
- /**
805
- * Returns validity message.
806
- *
807
- * @returns Validation message.
808
- */
809
- get: function () {
523
+ case 'checkbox':
524
+ case 'radio':
525
+ const attritube = this.getAttributeNS(null, 'value');
526
+ return attritube !== null ? attritube : 'on';
527
+ case 'file':
528
+ return this.files.length > 0 ? '/fake/path/' + this.files[0].name : '';
529
+ }
530
+ if (this._value === null) {
531
+ return this.getAttributeNS(null, 'value') || '';
532
+ }
533
+ return this._value;
534
+ }
535
+ /**
536
+ * Sets value.
537
+ *
538
+ * @param value Value.
539
+ */
540
+ set value(value) {
541
+ switch (this.type) {
542
+ case 'hidden':
543
+ case 'submit':
544
+ case 'image':
545
+ case 'reset':
546
+ case 'button':
547
+ case 'checkbox':
548
+ case 'radio':
549
+ this.setAttributeNS(null, 'value', value);
550
+ break;
551
+ case 'file':
552
+ if (value !== '') {
553
+ throw new DOMException_1.default('Input elements of type "file" may only programmatically set the value to empty string.', DOMExceptionNameEnum_1.default.invalidStateError);
554
+ }
555
+ break;
556
+ default:
557
+ const oldValue = this._value;
558
+ this._value = HTMLInputElementValueSanitizer_1.default.sanitize(this, value);
559
+ if (oldValue !== this._value) {
560
+ this._selectionStart = this._value.length;
561
+ this._selectionEnd = this._value.length;
562
+ this._selectionDirection = HTMLInputElementSelectionDirectionEnum_1.default.none;
563
+ }
564
+ break;
565
+ }
566
+ }
567
+ /**
568
+ * Returns selection start.
569
+ *
570
+ * @returns Selection start.
571
+ */
572
+ get selectionStart() {
573
+ if (!this._isSelectionSupported()) {
810
574
  return null;
811
- },
812
- enumerable: false,
813
- configurable: true
814
- });
815
- Object.defineProperty(HTMLInputElement.prototype, "willValidate", {
816
- /**
817
- * Returns "true" if it will validate.
818
- *
819
- * @returns "true" if it will validate.
820
- */
821
- get: function () {
822
- return (this.type !== 'hidden' &&
823
- this.type !== 'reset' &&
824
- this.type !== 'button' &&
825
- !this.disabled &&
826
- !this['readOnly']);
827
- },
828
- enumerable: false,
829
- configurable: true
830
- });
831
- Object.defineProperty(HTMLInputElement.prototype, "valueAsDate", {
832
- /**
833
- * Returns value as Date.
834
- *
835
- * @returns Date.
836
- */
837
- get: function () {
838
- return this.value ? new Date(this.value) : null;
839
- },
840
- enumerable: false,
841
- configurable: true
842
- });
843
- Object.defineProperty(HTMLInputElement.prototype, "valueAsNumber", {
844
- /**
845
- * Returns value as number.
846
- *
847
- * @returns Number.
848
- */
849
- get: function () {
850
- return this.value ? parseFloat(this.value) : NaN;
851
- },
852
- enumerable: false,
853
- configurable: true
854
- });
575
+ }
576
+ if (this._selectionStart === null) {
577
+ return this.value.length;
578
+ }
579
+ return this._selectionStart;
580
+ }
581
+ /**
582
+ * Sets selection start.
583
+ *
584
+ * @param start Start.
585
+ */
586
+ set selectionStart(start) {
587
+ if (!this._isSelectionSupported()) {
588
+ throw new DOMException_1.default(`The input element's type (${this.type}) does not support selection.`, DOMExceptionNameEnum_1.default.invalidStateError);
589
+ }
590
+ this.setSelectionRange(start, Math.max(start, this.selectionEnd), this._selectionDirection);
591
+ }
592
+ /**
593
+ * Returns selection end.
594
+ *
595
+ * @returns Selection end.
596
+ */
597
+ get selectionEnd() {
598
+ if (!this._isSelectionSupported()) {
599
+ return null;
600
+ }
601
+ if (this._selectionEnd === null) {
602
+ return this.value.length;
603
+ }
604
+ return this._selectionEnd;
605
+ }
606
+ /**
607
+ * Sets selection end.
608
+ *
609
+ * @param end End.
610
+ */
611
+ set selectionEnd(end) {
612
+ if (!this._isSelectionSupported()) {
613
+ throw new DOMException_1.default(`The input element's type (${this.type}) does not support selection.`, DOMExceptionNameEnum_1.default.invalidStateError);
614
+ }
615
+ this.setSelectionRange(this.selectionStart, end, this._selectionDirection);
616
+ }
617
+ /**
618
+ * Returns selection direction.
619
+ *
620
+ * @returns Selection direction.
621
+ */
622
+ get selectionDirection() {
623
+ if (!this._isSelectionSupported()) {
624
+ return null;
625
+ }
626
+ return this._selectionDirection;
627
+ }
628
+ /**
629
+ * Sets selection direction.
630
+ *
631
+ * @param direction Direction.
632
+ */
633
+ set selectionDirection(direction) {
634
+ if (!this._isSelectionSupported()) {
635
+ throw new DOMException_1.default(`The input element's type (${this.type}) does not support selection.`, DOMExceptionNameEnum_1.default.invalidStateError);
636
+ }
637
+ this.setSelectionRange(this._selectionStart, this._selectionEnd, direction);
638
+ }
639
+ /**
640
+ * Returns the parent form element.
641
+ *
642
+ * @returns Form.
643
+ */
644
+ get form() {
645
+ let parent = this.parentNode;
646
+ while (parent && parent.tagName !== 'FORM') {
647
+ parent = parent.parentNode;
648
+ }
649
+ return parent;
650
+ }
651
+ /**
652
+ * Returns validity state.
653
+ *
654
+ * @returns Validity state.
655
+ */
656
+ get validity() {
657
+ return new ValidityState_1.default(this);
658
+ }
659
+ /**
660
+ * Returns "true" if it will validate.
661
+ *
662
+ * @returns "true" if it will validate.
663
+ */
664
+ get willValidate() {
665
+ return (this.type !== 'hidden' &&
666
+ this.type !== 'reset' &&
667
+ this.type !== 'button' &&
668
+ !this.disabled &&
669
+ !this['readOnly']);
670
+ }
671
+ /**
672
+ * Returns value as Date.
673
+ *
674
+ * @returns Date.
675
+ */
676
+ get valueAsDate() {
677
+ return this.value ? new Date(this.value) : null;
678
+ }
679
+ /**
680
+ * Returns value as number.
681
+ *
682
+ * @returns Number.
683
+ */
684
+ get valueAsNumber() {
685
+ return this.value ? parseFloat(this.value) : NaN;
686
+ }
687
+ /**
688
+ * Returns validation message.
689
+ *
690
+ * @returns Validation message.
691
+ */
692
+ get validationMessage() {
693
+ return this._validationMessage;
694
+ }
695
+ /**
696
+ * Sets validation message.
697
+ *
698
+ * @param message Message.
699
+ */
700
+ setCustomValidity(message) {
701
+ this._validationMessage = String(message);
702
+ }
703
+ /**
704
+ * Reports validity by dispatching an "invalid" event.
705
+ */
706
+ reportValidity() {
707
+ if (this._validationMessage) {
708
+ this.dispatchEvent(new Event_1.default('invalid', {
709
+ bubbles: true,
710
+ cancelable: true
711
+ }));
712
+ }
713
+ }
855
714
  /**
856
715
  * Selects the text.
857
716
  */
858
- HTMLInputElement.prototype.select = function () {
717
+ select() {
859
718
  if (!this._isSelectionSupported()) {
860
719
  return null;
861
720
  }
@@ -863,7 +722,7 @@ var HTMLInputElement = /** @class */ (function (_super) {
863
722
  this._selectionEnd = this.value.length;
864
723
  this._selectionDirection = HTMLInputElementSelectionDirectionEnum_1.default.none;
865
724
  this.dispatchEvent(new Event_1.default('select', { bubbles: true, cancelable: true }));
866
- };
725
+ }
867
726
  /**
868
727
  * Set selection range.
869
728
  *
@@ -871,10 +730,9 @@ var HTMLInputElement = /** @class */ (function (_super) {
871
730
  * @param end End.
872
731
  * @param [direction="none"] Direction.
873
732
  */
874
- HTMLInputElement.prototype.setSelectionRange = function (start, end, direction) {
875
- if (direction === void 0) { direction = 'none'; }
733
+ setSelectionRange(start, end, direction = 'none') {
876
734
  if (!this._isSelectionSupported()) {
877
- throw new DOMException_1.default("The input element's type (".concat(this.type, ") does not support selection."), DOMExceptionNameEnum_1.default.invalidStateError);
735
+ throw new DOMException_1.default(`The input element's type (${this.type}) does not support selection.`, DOMExceptionNameEnum_1.default.invalidStateError);
878
736
  }
879
737
  this._selectionEnd = Math.min(end, this.value.length);
880
738
  this._selectionStart = Math.min(start, this._selectionEnd);
@@ -884,7 +742,7 @@ var HTMLInputElement = /** @class */ (function (_super) {
884
742
  ? direction
885
743
  : HTMLInputElementSelectionDirectionEnum_1.default.none;
886
744
  this.dispatchEvent(new Event_1.default('select', { bubbles: true, cancelable: true }));
887
- };
745
+ }
888
746
  /**
889
747
  * Set range text.
890
748
  *
@@ -894,12 +752,9 @@ var HTMLInputElement = /** @class */ (function (_super) {
894
752
  * @param [direction] Direction.
895
753
  * @param selectionMode
896
754
  */
897
- HTMLInputElement.prototype.setRangeText = function (replacement, start, end, selectionMode) {
898
- if (start === void 0) { start = null; }
899
- if (end === void 0) { end = null; }
900
- if (selectionMode === void 0) { selectionMode = HTMLInputElementSelectionModeEnum_1.default.preserve; }
755
+ setRangeText(replacement, start = null, end = null, selectionMode = HTMLInputElementSelectionModeEnum_1.default.preserve) {
901
756
  if (!this._isSelectionSupported()) {
902
- throw new DOMException_1.default("The input element's type (".concat(this.type, ") does not support selection."), DOMExceptionNameEnum_1.default.invalidStateError);
757
+ throw new DOMException_1.default(`The input element's type (${this.type}) does not support selection.`, DOMExceptionNameEnum_1.default.invalidStateError);
903
758
  }
904
759
  if (start === null) {
905
760
  start = this._selectionStart;
@@ -912,11 +767,11 @@ var HTMLInputElement = /** @class */ (function (_super) {
912
767
  }
913
768
  start = Math.min(start, this.value.length);
914
769
  end = Math.min(end, this.value.length);
915
- var val = this.value;
916
- var selectionStart = this._selectionStart;
917
- var selectionEnd = this._selectionEnd;
770
+ const val = this.value;
771
+ let selectionStart = this._selectionStart;
772
+ let selectionEnd = this._selectionEnd;
918
773
  this.value = val.slice(0, start) + replacement + val.slice(end);
919
- var newEnd = start + this.value.length;
774
+ const newEnd = start + this.value.length;
920
775
  switch (selectionMode) {
921
776
  case HTMLInputElementSelectionModeEnum_1.default.select:
922
777
  this.setSelectionRange(start, newEnd);
@@ -928,7 +783,7 @@ var HTMLInputElement = /** @class */ (function (_super) {
928
783
  this.setSelectionRange(newEnd, newEnd);
929
784
  break;
930
785
  default:
931
- var delta = replacement.length - (end - start);
786
+ const delta = replacement.length - (end - start);
932
787
  if (selectionStart > end) {
933
788
  selectionStart += delta;
934
789
  }
@@ -944,37 +799,37 @@ var HTMLInputElement = /** @class */ (function (_super) {
944
799
  this.setSelectionRange(selectionStart, selectionEnd);
945
800
  break;
946
801
  }
947
- };
802
+ }
948
803
  /**
949
804
  * Checks validity.
950
805
  *
951
806
  * @returns "true" if the field is valid.
952
807
  */
953
- HTMLInputElement.prototype.checkValidity = function () {
808
+ checkValidity() {
954
809
  return true;
955
- };
810
+ }
956
811
  /**
957
812
  * Steps up.
958
813
  *
959
814
  * @param [increment] Increment.
960
815
  */
961
- HTMLInputElement.prototype.stepUp = function (increment) {
962
- var newValue = HTMLInputElementValueStepping_1.default.step(this.type, this.value, 1, increment);
816
+ stepUp(increment) {
817
+ const newValue = HTMLInputElementValueStepping_1.default.step(this.type, this.value, 1, increment);
963
818
  if (newValue !== null) {
964
819
  this.value = newValue;
965
820
  }
966
- };
821
+ }
967
822
  /**
968
823
  * Steps down.
969
824
  *
970
825
  * @param [increment] Increment.
971
826
  */
972
- HTMLInputElement.prototype.stepDown = function (increment) {
973
- var newValue = HTMLInputElementValueStepping_1.default.step(this.type, this.value, -1, increment);
827
+ stepDown(increment) {
828
+ const newValue = HTMLInputElementValueStepping_1.default.step(this.type, this.value, -1, increment);
974
829
  if (newValue !== null) {
975
830
  this.value = newValue;
976
831
  }
977
- };
832
+ }
978
833
  /**
979
834
  * Clones a node.
980
835
  *
@@ -982,9 +837,8 @@ var HTMLInputElement = /** @class */ (function (_super) {
982
837
  * @param [deep=false] "true" to clone deep.
983
838
  * @returns Cloned node.
984
839
  */
985
- HTMLInputElement.prototype.cloneNode = function (deep) {
986
- if (deep === void 0) { deep = false; }
987
- var clone = _super.prototype.cloneNode.call(this, deep);
840
+ cloneNode(deep = false) {
841
+ const clone = super.cloneNode(deep);
988
842
  clone.formAction = this.formAction;
989
843
  clone.formMethod = this.formMethod;
990
844
  clone.formNoValidate = this.formNoValidate;
@@ -997,7 +851,7 @@ var HTMLInputElement = /** @class */ (function (_super) {
997
851
  clone._selectionEnd = this._selectionEnd;
998
852
  clone._selectionDirection = this._selectionDirection;
999
853
  return clone;
1000
- };
854
+ }
1001
855
  /**
1002
856
  * Checks if private value is supported.
1003
857
  *
@@ -1020,14 +874,13 @@ var HTMLInputElement = /** @class */ (function (_super) {
1020
874
  *
1021
875
  * @returns "true" if selection is supported.
1022
876
  */
1023
- HTMLInputElement.prototype._isSelectionSupported = function () {
877
+ _isSelectionSupported() {
1024
878
  return (this.type === 'text' ||
1025
879
  this.type === 'search' ||
1026
880
  this.type === 'url' ||
1027
881
  this.type === 'tel' ||
1028
882
  this.type === 'password');
1029
- };
1030
- return HTMLInputElement;
1031
- }(HTMLElement_1.default));
883
+ }
884
+ }
1032
885
  exports.default = HTMLInputElement;
1033
886
  //# sourceMappingURL=HTMLInputElement.js.map