diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 87a7e7c49..e4c25f1db 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -5500,8 +5500,9 @@ interface HTMLInputElement extends HTMLElement { * Sets the start and end positions of a selection in a text field. * @param start The offset into the text field for the start of the selection. * @param end The offset into the text field for the end of the selection. + * @param direction The direction in which the selection is performed. */ - setSelectionRange(start?: number, end?: number, direction?: string): void; + setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void; /** * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value. * @param n Value to decrement the value by. @@ -6963,8 +6964,9 @@ interface HTMLTextAreaElement extends HTMLElement { * Sets the start and end positions of a selection in a text field. * @param start The offset into the text field for the start of the selection. * @param end The offset into the text field for the end of the selection. + * @param direction The direction in which the selection is performed. */ - setSelectionRange(start: number, end: number): void; + setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void; addEventListener(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; diff --git a/inputfiles/comments.json b/inputfiles/comments.json index e4429e704..52da7cbe6 100644 --- a/inputfiles/comments.json +++ b/inputfiles/comments.json @@ -1948,7 +1948,7 @@ }, { "name": "setSelectionRange", - "comment": "/**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n */" + "comment": "/**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n * @param direction The direction in which the selection is performed.\r\n */" }, { "name": "select", @@ -2335,7 +2335,7 @@ }, { "name": "setSelectionRange", - "comment": "/**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n */" + "comment": "/**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n * @param direction The direction in which the selection is performed.\r\n */" }, { "name": "select", diff --git a/inputfiles/overridingTypes.json b/inputfiles/overridingTypes.json index b4643e728..0398a1ed7 100644 --- a/inputfiles/overridingTypes.json +++ b/inputfiles/overridingTypes.json @@ -1739,5 +1739,21 @@ "readonly": true, "name": "lastModifiedDate", "type": "Date" + }, + { + "kind": "method", + "interface": "HTMLInputElement", + "name": "setSelectionRange", + "signatures": [ + "setSelectionRange(start: number, end: number, direction?: \"forward\" | \"backward\" | \"none\"): void" + ] + }, + { + "kind": "method", + "interface": "HTMLTextAreaElement", + "name": "setSelectionRange", + "signatures": [ + "setSelectionRange(start: number, end: number, direction?: \"forward\" | \"backward\" | \"none\"): void" + ] } ] \ No newline at end of file