Handling Forms & User Input
What's wrong with this approach to input transformation?
const input = document.querySelector('input');
Object.defineProperty(input, 'value', {
set(v) {
this.setAttribute('value', v.toUpperCase());
}
});
const input = document.querySelector('input');
Object.defineProperty(input, 'value', {
set(v) {
this.setAttribute('value', v.toUpperCase());
}
});