Pregunta de entrevista de Source Defense

Get the user's input after adding protections on getting input values.

Respuesta de la entrevista

Anónimo

14 ago 2021

- Use the onchange event - Use the oninput event to build the result string - Replace the input with a contenteditable div that looks like the input - Replace the value descriptor with one from a newly created native input element - Find the original descriptor (if available) and replace the custom one (if any)