Skip to content

Commit b6c80bf

Browse files
authored
Add readonly getters and setters for input fields (#204)
1 parent 65aac16 commit b6c80bf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/elements.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,14 @@ export class InputView extends HTMLBaseView<InputFieldElement> {
12481248
(this._el as HTMLInputElement).checked = value;
12491249
}
12501250

1251+
get readonly() {
1252+
return (this._el as HTMLInputElement).readOnly;
1253+
}
1254+
1255+
set readonly(value: boolean) {
1256+
(this._el as HTMLInputElement).readOnly = value;
1257+
}
1258+
12511259
get value() {
12521260
return this._el.value;
12531261
}

0 commit comments

Comments
 (0)