Skip to content

Tag: event-handling

When is an event.target.value not a string?

I came accross value = String(event.target.value || “”) when a textinputs keyup/keydown event is fired. But i’m not sure when the event.target.value is not a string? Is this possible? When is something else passed off as an event.target.value? Answer If the event.target element is not an inp…