From 9d6a210b32889b09c3cf297c52efd82e33955fc9 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Wed, 24 Feb 2016 11:23:23 +0100 Subject: [PATCH 1/3] Add minLength property to input & textarea Fixes https://github.com/Microsoft/TypeScript/issues/7197 HTML5 spec: https://www.w3.org/TR/html5/forms.html#the-maxlength-and-minlength-attributes --- baselines/dom.generated.d.ts | 2 ++ inputfiles/addedTypes.json | 12 ++++++++++++ inputfiles/comments.json | Bin 277538 -> 278370 bytes 3 files changed, 14 insertions(+) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 06f04fb29..871807dae 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -5126,6 +5126,7 @@ interface HTMLInputElement extends HTMLElement { * Returns whether an element will successfully validate based on forms validation rules and constraints. */ willValidate: boolean; + minLength: number; /** * Returns whether a form will validate when it is submitted, without having to submit it. */ @@ -6631,6 +6632,7 @@ interface HTMLTextAreaElement extends HTMLElement { * Sets or retrieves how to handle wordwrapping in the object. */ wrap: string; + minLength: number; /** * Returns whether a form will validate when it is submitted, without having to submit it. */ diff --git a/inputfiles/addedTypes.json b/inputfiles/addedTypes.json index fa4110053..feb5a9732 100644 --- a/inputfiles/addedTypes.json +++ b/inputfiles/addedTypes.json @@ -400,5 +400,17 @@ "interface": "Element", "name": "getElementsByTagName", "signatures": ["getElementsByTagName(tagname: \"picture\"): NodeListOf"] + }, + { + "kind": "property", + "interface": "HTMLInputElement", + "name": "minLength", + "type": "number" + }, + { + "kind": "property", + "interface": "HTMLTextAreaElement", + "name": "minLength", + "type": "number" } ] diff --git a/inputfiles/comments.json b/inputfiles/comments.json index 99e1433bbd451bfe7cc4b1a9eea6d140009419b3..f1e818fae89fb42f53ec134f90f9c1facf54c603 100644 GIT binary patch delta 113 zcmZ4VL*UUrfrb{wEll%fF=sO5ORY2x&AyP5c=e{p91vpv9>c>&{Oze#b^EEuJx zH+*7Jo2=l_GyQ=WBj5HL7R(-u(+!vyIX3qkHDlbaV8yJ*yj^24lhy(pMqT;=04@S7 A!~g&Q delta 31 lcmaF#Phimxfrb{wEll%fZMU1lv}FZ|oX5D`z=PT7I{@@Y4hjGO From 5553f89866b57f0cd0422aa727ddd1c248df1334 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Wed, 24 Feb 2016 11:23:23 +0100 Subject: [PATCH 2/3] Add minLength property to input & textarea Fixes https://github.com/Microsoft/TypeScript/issues/7197 HTML5 spec: https://www.w3.org/TR/html5/forms.html#the-maxlength-and-minlength-attributes --- baselines/dom.generated.d.ts | 2 ++ inputfiles/addedTypes.json | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 06f04fb29..871807dae 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -5126,6 +5126,7 @@ interface HTMLInputElement extends HTMLElement { * Returns whether an element will successfully validate based on forms validation rules and constraints. */ willValidate: boolean; + minLength: number; /** * Returns whether a form will validate when it is submitted, without having to submit it. */ @@ -6631,6 +6632,7 @@ interface HTMLTextAreaElement extends HTMLElement { * Sets or retrieves how to handle wordwrapping in the object. */ wrap: string; + minLength: number; /** * Returns whether a form will validate when it is submitted, without having to submit it. */ diff --git a/inputfiles/addedTypes.json b/inputfiles/addedTypes.json index fa4110053..feb5a9732 100644 --- a/inputfiles/addedTypes.json +++ b/inputfiles/addedTypes.json @@ -400,5 +400,17 @@ "interface": "Element", "name": "getElementsByTagName", "signatures": ["getElementsByTagName(tagname: \"picture\"): NodeListOf"] + }, + { + "kind": "property", + "interface": "HTMLInputElement", + "name": "minLength", + "type": "number" + }, + { + "kind": "property", + "interface": "HTMLTextAreaElement", + "name": "minLength", + "type": "number" } ] From 470ed40c371754bc781df194c6a0aaceeefd4ba1 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Fri, 26 Feb 2016 09:37:53 +0100 Subject: [PATCH 3/3] Remove changes to comments.json --- inputfiles/comments.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/inputfiles/comments.json b/inputfiles/comments.json index 90f1ab6d8..e08b6f51a 100644 --- a/inputfiles/comments.json +++ b/inputfiles/comments.json @@ -1840,10 +1840,6 @@ "name": "hspace", "comment": "/**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */" }, - { - "name": "minLength", - "comment": "/**\r\n * Sets or retrieves the minimum number of characters that the user can enter in a text control.\r\n */" - }, { "name": "maxLength", "comment": "/**\r\n * Sets or retrieves the maximum number of characters that the user can enter in a text control.\r\n */" @@ -2315,10 +2311,6 @@ "name": "required", "comment": "/**\r\n * When present, marks an element that can't be submitted without a value.\r\n */" }, - { - "name": "minLength", - "comment": "/**\r\n * Sets or retrieves the minimum number of characters that the user can enter in a text control.\r\n */" - }, { "name": "maxLength", "comment": "/**\r\n * Sets or retrieves the maximum number of characters that the user can enter in a text control.\r\n */"