I've selected input using "getElementById". After I want add "setSelectionRange" method to that element. But there is an error "property 'setselectionrange' does not exist on type 'htmlelement' " . What could be the problem?
const textfield = document.getElementById("masktextfield")
console.log(textfield)
that's what shows in console
now adding "setselectionrange"
textfield.setSelectionRange(0,0) // property 'setselectionrange' does not exist on type 'htmlelement'
const textfield = document.getElementById("masktextfield");
textfield.focus();
textfield.setSelectionRange(2, 5);
<input type="text" id="masktextfield" value="sathish"/>