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.
- 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.d.ts +17 -6
- package/lib/nodes/html-input-element/HTMLInputElement.js +719 -866
- 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/IHTMLInputElement.d.ts +11 -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 +31 -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 +72 -105
- package/lib/window/Window.js +269 -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-input-element/HTMLInputElement.ts +37 -12
- package/src/nodes/html-input-element/IHTMLInputElement.ts +13 -1
- 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 +26 -12
- package/src/window/VMGlobalPropertyScript.ts +62 -0
- package/src/window/Window.ts +106 -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,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
|
-
|
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
|
-
},
|
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
|
-
|
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
|
-
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
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
return this.value
|
839
|
-
}
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
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
|
-
|
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
|
-
|
875
|
-
if (direction === void 0) { direction = 'none'; }
|
733
|
+
setSelectionRange(start, end, direction = 'none') {
|
876
734
|
if (!this._isSelectionSupported()) {
|
877
|
-
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);
|
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
|
-
|
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(
|
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
|
-
|
916
|
-
|
917
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
808
|
+
checkValidity() {
|
954
809
|
return true;
|
955
|
-
}
|
810
|
+
}
|
956
811
|
/**
|
957
812
|
* Steps up.
|
958
813
|
*
|
959
814
|
* @param [increment] Increment.
|
960
815
|
*/
|
961
|
-
|
962
|
-
|
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
|
-
|
973
|
-
|
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
|
-
|
986
|
-
|
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
|
-
|
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
|
-
|
1031
|
-
}(HTMLElement_1.default));
|
883
|
+
}
|
884
|
+
}
|
1032
885
|
exports.default = HTMLInputElement;
|
1033
886
|
//# sourceMappingURL=HTMLInputElement.js.map
|