Source Defense interview question

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

Interview Answer

Anonymous

14 Aug 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)