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