Skip to content

Commit ad49a0b

Browse files
committed
Migrate HTMLTextAreaElement
1 parent 15447bb commit ad49a0b

File tree

6 files changed

+27
-50
lines changed

6 files changed

+27
-50
lines changed

baselines/dom.generated.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19851,7 +19851,7 @@ interface HTMLTextAreaElement extends HTMLElement {
1985119851
*
1985219852
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionDirection)
1985319853
*/
19854-
selectionDirection: "forward" | "backward" | "none";
19854+
selectionDirection: SelectionDirection;
1985519855
/**
1985619856
* The **`selectionEnd`** property of the HTMLTextAreaElement interface specifies the end position of the current text selection in a <textarea> element. It is a number representing the last index of the selected text. It can be used to both retrieve and set the index of the end of a <textarea>s selected text.
1985719857
*
@@ -19942,7 +19942,7 @@ interface HTMLTextAreaElement extends HTMLElement {
1994219942
*
1994319943
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setSelectionRange)
1994419944
*/
19945-
setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void;
19945+
setSelectionRange(start: number | null, end: number | null, direction?: SelectionDirection): void;
1994619946
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1994719947
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1994819948
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;

baselines/ts5.5/dom.generated.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19827,7 +19827,7 @@ interface HTMLTextAreaElement extends HTMLElement {
1982719827
*
1982819828
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionDirection)
1982919829
*/
19830-
selectionDirection: "forward" | "backward" | "none";
19830+
selectionDirection: SelectionDirection;
1983119831
/**
1983219832
* The **`selectionEnd`** property of the HTMLTextAreaElement interface specifies the end position of the current text selection in a <textarea> element. It is a number representing the last index of the selected text. It can be used to both retrieve and set the index of the end of a <textarea>s selected text.
1983319833
*
@@ -19918,7 +19918,7 @@ interface HTMLTextAreaElement extends HTMLElement {
1991819918
*
1991919919
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setSelectionRange)
1992019920
*/
19921-
setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void;
19921+
setSelectionRange(start: number | null, end: number | null, direction?: SelectionDirection): void;
1992219922
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1992319923
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1992419924
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;

baselines/ts5.6/dom.generated.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19848,7 +19848,7 @@ interface HTMLTextAreaElement extends HTMLElement {
1984819848
*
1984919849
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionDirection)
1985019850
*/
19851-
selectionDirection: "forward" | "backward" | "none";
19851+
selectionDirection: SelectionDirection;
1985219852
/**
1985319853
* The **`selectionEnd`** property of the HTMLTextAreaElement interface specifies the end position of the current text selection in a <textarea> element. It is a number representing the last index of the selected text. It can be used to both retrieve and set the index of the end of a <textarea>s selected text.
1985419854
*
@@ -19939,7 +19939,7 @@ interface HTMLTextAreaElement extends HTMLElement {
1993919939
*
1994019940
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setSelectionRange)
1994119941
*/
19942-
setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void;
19942+
setSelectionRange(start: number | null, end: number | null, direction?: SelectionDirection): void;
1994319943
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1994419944
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1994519945
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;

baselines/ts5.9/dom.generated.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19848,7 +19848,7 @@ interface HTMLTextAreaElement extends HTMLElement {
1984819848
*
1984919849
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionDirection)
1985019850
*/
19851-
selectionDirection: "forward" | "backward" | "none";
19851+
selectionDirection: SelectionDirection;
1985219852
/**
1985319853
* The **`selectionEnd`** property of the HTMLTextAreaElement interface specifies the end position of the current text selection in a <textarea> element. It is a number representing the last index of the selected text. It can be used to both retrieve and set the index of the end of a <textarea>s selected text.
1985419854
*
@@ -19939,7 +19939,7 @@ interface HTMLTextAreaElement extends HTMLElement {
1993919939
*
1994019940
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setSelectionRange)
1994119941
*/
19942-
setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void;
19942+
setSelectionRange(start: number | null, end: number | null, direction?: SelectionDirection): void;
1994319943
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1994419944
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1994519945
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;

inputfiles/overridingTypes.jsonc

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,48 +1481,6 @@
14811481
}
14821482
}
14831483
},
1484-
"HTMLTextAreaElement": {
1485-
"properties": {
1486-
"property": {
1487-
"autocomplete": {
1488-
"name": "autocomplete",
1489-
"overrideType": "AutoFill"
1490-
},
1491-
"labels": {
1492-
"name": "labels",
1493-
"overrideType": "NodeListOf<HTMLLabelElement>"
1494-
},
1495-
"selectionDirection": {
1496-
"name": "selectionDirection",
1497-
"overrideType": "\"forward\" | \"backward\" | \"none\""
1498-
}
1499-
}
1500-
},
1501-
"methods": {
1502-
"method": {
1503-
"setSelectionRange": {
1504-
"signature": {
1505-
"0": {
1506-
"param": [
1507-
{
1508-
"name": "start",
1509-
"nullable": true
1510-
},
1511-
{
1512-
"name": "end",
1513-
"nullable": true
1514-
},
1515-
{
1516-
"name": "direction",
1517-
"overrideType": "\"forward\" | \"backward\" | \"none\""
1518-
}
1519-
]
1520-
}
1521-
}
1522-
}
1523-
}
1524-
}
1525-
},
15261484
"ServiceWorkerContainer": {
15271485
"methods": {
15281486
"method": {

inputfiles/patches/html.kdl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,25 @@ interface HTMLTableSectionElement {
3636
}
3737
}
3838

39+
interface HTMLTextAreaElement {
40+
property autocomplete type=AutoFill
41+
property labels {
42+
type NodeListOf {
43+
type HTMLLabelElement
44+
}
45+
}
46+
property selectionDirection type=SelectionDirection
47+
method setSelectionRange signatureIndex=0 {
48+
param start {
49+
type nullable=#true
50+
}
51+
param end {
52+
type nullable=#true
53+
}
54+
param direction type=SelectionDirection
55+
}
56+
}
57+
3958
interface-mixin MessageEventTarget overrideThis=T typeParameters=T
4059

4160
interface-mixin WindowEventHandlers {

0 commit comments

Comments
 (0)